Hi, trying to make an email form in ASP.NET C# via SMTP, however this generates a:
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I't worked fine when I deployed it on localhost and connected to my hosts SMTP server, but once I deployed the site itself on my host it generated the error above.
After some research I narrowed it down to the trust level, on my host I have a trust level of medium since its shared hosting, once I replicated the medium trust level in my web.config on localhost I encountered the same problem. The line that generates the problem is:
SmtpClient client = new SmtpClient(server, port);
I was under the impression the trust level required for above operation was Medium(which I have)? Still it generates the security exception. Being new to ASP.NET I now require some help, any tips or pointers? Do I need to utilize t ...
Go to the complete details ...