Error:
I got this error while trying to deploy a visual webpart to SharePoint 2010. The deployment type is of web application rather globalassemblycache. The error message I got is Request for the permission of type
'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed. You can also check lots of errors and solutions.
Details:
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.
Description & Solution:
By default SharePoint or WSS is configured with security policy as WSS_Minimal. The solution is to increase the security level to Full or WSS_Medium.
To do this go to the web.config of the web application which is located inside the C:\inetpub\wwwroot\wss\VirtualDirectories\[Web application directory]. Open the web.config file and search for
<trust level="WSS_Minimal" originUrl="" />.
And now Replace the WSS_Minimal with Full or WSS_Medium.
So the final tag will be like below:
<trust level="Full" originUrl="" />
<trust level=”WSS_Medium” originUrl=”" />
I got this error while trying to deploy a visual webpart to SharePoint 2010. The deployment type is of web application rather globalassemblycache. The error message I got is Request for the permission of type
'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed. You can also check lots of errors and solutions.
Details:
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.
Description & Solution:
By default SharePoint or WSS is configured with security policy as WSS_Minimal. The solution is to increase the security level to Full or WSS_Medium.
To do this go to the web.config of the web application which is located inside the C:\inetpub\wwwroot\wss\VirtualDirectories\[Web application directory]. Open the web.config file and search for
<trust level="WSS_Minimal" originUrl="" />.
And now Replace the WSS_Minimal with Full or WSS_Medium.
So the final tag will be like below:
<trust level="Full" originUrl="" />
<trust level=”WSS_Medium” originUrl=”" />