I have been intermittently receiving the following error on my site:
Server Error in '/cms' Application.
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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
...etc.
--------------------------
I found a response in a post on this forum regarding a similar error and sent the following message to my hosting service.
We are using DotNetNuke 4.5 to run our website. I am getting a security error when trying to enter the site:
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.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Please modify the ASP.NET worker account permissions to have full file control to the root and all sub folders of my installation for our domain. This will allow DotNetNuke the adequate permissions to operate successfully.
--------------------------
Their response was:
Regarding your concern, please be advised that the security level for your Windows based hosting package is on a Medium Trust Level. We cannot change the said configuration since your current package is on a shared server. Changing that settings would affect the other sites hosted on the same server you are in.
--------------------------
What else should I ask for to prevent this security error from recurring? It doesn't happen all the time, but the site was not working for about 2 days this week because of the error.
Thanks,
Cyrelle