1
Answer

I want to submit enquiry form for save this information for email id, This is work on local host but show the error on line time. ple send me response

Rajendra Meena

Rajendra Meena

13y
1.9k
1


Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.




Source Error:

Line 48: Line 49: System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential(Email, Password); Line 50: SmtpClient mSmtpClient = new SmtpClient(Host, Port); Line 51: mSmtpClient.EnableSsl = true; Line 52: mSmtpClient.UseDefaultCredentials = false;

Answers (1)