how to solve this problem
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
Line 86: SmtpClient client = new SmtpClient();
Line 87: client.Host = "smtp.gmail.com";
Line 88: client.Port = 587;
Line 89: string useractivation = "http://myselfprofile.com/useractivation.aspx?email=" + regemail.Text;
Line 90: message.From = new MailAddress("myselfprofiles@gmail.com");
|