Sometimes, while executing an application in sharepoint environment, we get the following error.
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. in sharepoint
This problem is basically related with the Trust Level. Just make the following changes in under element of the web.config file of the corresponding web application.
Change from,
< system.web >
< trust level="WSS_Minimal" originUrl="" / >
to in web.config
< system.web >
< trust level="Full" originUrl="" / >
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. in sharepoint
This problem is basically related with the Trust Level. Just make the following changes in
Change from,
< system.web >
< trust level="WSS_Minimal" originUrl="" / >
to in web.config
< system.web >
< trust level="Full" originUrl="" / >