We have some issues while migrating our Asp.Net Web Application .Net 3.5 to .Net 4.0.
It seemed that we had a Caspol Security Exception, so we added this to our web.config :
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
and nothing changed. It seem that we cannot execute the assembly "Microsoft.Web.Management.Iis" in AspNet 4.0. We executed the caspol.exe utility in .Net 4.0 to grant full trust permission with no success.
When we used the local administrator account on the application pools, all work fine. But when we used a domain adminstrator user account, we got this error below :
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +6502926
System.Security.SecurityManager.ResolveCasPolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +99
[FileLoadException: Could not load file or assembly 'Microsoft.Web.Management.Iis, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
We are running in win2k8 r2 environment with aspnet 2.0 and 4.0 running on the iis 7.5.
Do you have any suggestion to solve our problems.
Thanks
We juste make a call support to microsoft to solve the problem.
The problem was because our web site files are hosted on a SAN. There is an hotfix on the framework 4.0 for this issue.
The hotfix is not public at the moment but is name is NDP40-KB2580188-x64.exe
User contributions licensed under CC BY-SA 3.0