I've developed a web part using WSPBuilder and created a feature to deploy it
I managed to get the web part running on my web application using WSS_Minimal trust level in Web.Config, so there is no problem with the code (Anyway I'm adding a literal control with a fixed text in CreateChildControls()).
I knew that deploying to GAC does not require setting the trust level as the assembly deployed to GAC is fully trusted by CLR but when I change the trust level to any of (Minimal/Low/Medium/High) while deploying to GAC, I get the 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
Exception Details: System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=184.108.40.206, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed"
so why I'm getting this exception when deploying to GAC while the assembly deployed should be FULLY trusted and not requiring a specific trust level as opposed to \BIN deployment.
THosE wHo doN'T apPreCiATe LiFe,
View Complete Post