B
Ben
Hi,
I'm new to VB.Net programming, and am trying to learn VB using the new
Visual Studeio 2008 Express Edition. I've decided just to jump
straight in and try to program a simple mail form with 3 fields, 'to',
'subject' & 'body'. Running through the debugger, most of the code
seems to work, however I keep getting the following security error,
even though I have set the application as a full trusted application.
A first chance exception of type 'System.Security.SecurityException'
occurred in MyApplication.exe
Request for the permission of type
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The code that this happens on is the line below with the Call function
in.
Private Sub SendMail_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles SendMail.Click
Call SendMailSub(StrMailTo.Text, StrMailSub.Text,
StrMailBody.Text)
MsgBox("Your Messege Has Been Sent", MsgBoxStyle.Information,
"Messege Sent")
End Sub
Can anyone please help with this error?
Many thanks
Ben
I'm new to VB.Net programming, and am trying to learn VB using the new
Visual Studeio 2008 Express Edition. I've decided just to jump
straight in and try to program a simple mail form with 3 fields, 'to',
'subject' & 'body'. Running through the debugger, most of the code
seems to work, however I keep getting the following security error,
even though I have set the application as a full trusted application.
A first chance exception of type 'System.Security.SecurityException'
occurred in MyApplication.exe
Request for the permission of type
'System.Web.AspNetHostingPermission, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The code that this happens on is the line below with the Call function
in.
Private Sub SendMail_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles SendMail.Click
Call SendMailSub(StrMailTo.Text, StrMailSub.Text,
StrMailBody.Text)
MsgBox("Your Messege Has Been Sent", MsgBoxStyle.Information,
"Messege Sent")
End Sub
Can anyone please help with this error?
Many thanks
Ben