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: The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible
logs: Security.
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: The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible
logs: Security.
In order to resolve your issue, please check what is the port you are using. Assuming that you are sending on port 587 and your code doesn't work. The reason is that your server you deployed your application blocks the port which you are sending on. In
order to resolve this issue, you can try to use a new mail server which opens the port you need.
In addition, this issue will happen when the virtual directory points to a remote share in ASP.NET. To resolve this issue, grant the FullTrust right to the remote share as follows:
GordMacDonal...
Member
84 Points
132 Posts
clientemail.sendmail - Security exception
Dec 17, 2012 08:25 PM|LINK
Hi all,
I am receiving a runtime error - (see below) which is generated when the following line of code tries to execute:
any help would be most appreciated -
thanks Gord
--------------------------------------------------- Runtime Error: -------------------------------------------------------------------
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: The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.
Source Error:
Catherine Sh...
All-Star
23373 Points
2490 Posts
Microsoft
Re: clientemail.sendmail - Security exception
Dec 21, 2012 01:32 AM|LINK
Hi,
In order to resolve your issue, please check what is the port you are using. Assuming that you are sending on port 587 and your code doesn't work. The reason is that your server you deployed your application blocks the port which you are sending on. In order to resolve this issue, you can try to use a new mail server which opens the port you need.
In addition, this issue will happen when the virtual directory points to a remote share in ASP.NET. To resolve this issue, grant the FullTrust right to the remote share as follows:
http://support.microsoft.com/kb/320268
Best wisehs,
Feedback to us
Develop and promote your apps in Windows Store
GordMacDonal...
Member
84 Points
132 Posts
Re: clientemail.sendmail - Security exception
Dec 21, 2012 03:56 AM|LINK
Thanks so much for your reply Catherine - I will share with my collegues tommorrow.
Gord