I'm getting the below exception when i'm sending mail with the SMTPClient.Send(MailMsg);
"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
  I'm able to send the mail from local system, but when i'm sending mail from the website which is hosted in the shared server, i'm getting the above error. Even i had mentioned the below lines in web.config.
<location allowOverride="false" path="Default Web Site"> <system.web> <securityPolicy> <trustLevel name="Full" policyFile="internal"/> <trustLevel name="High" policyFile="web_hightrust.config"/> <trustLevel name="Medium" policyFile="web_mediumtrust.config"/> <trustLevel name="Low" policyFile="web_lowtrust.config"/> <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/> </securityPolicy> ...

Go to the complete details ...