A
Andrea Gallazzi
Hello,
I have a website on a NAS.
Permissions are set correctly because I can open HTML files.
When framework is involved i receive this exception:
System.Security.Policy.PolicyException: Required permissions cannot be
acquired.
It happens on file 'Microsoft.ApplicationBlocks.
Trace below.
I already tried to specify Full Trust in Webconfig.
Do you have any idea?
Thank you very much.
Andrea
Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission) +5343916
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +115
[FileLoadException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +465
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
System.Reflection.Assembly.Load(String assemblyString) +42
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +190
[ConfigurationErrorsException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +3642024
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +402
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
+155
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +235
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +76
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +2944151
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +204
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +613
[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+79
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +2943544
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1163
[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +2739623
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+2739533
I have a website on a NAS.
Permissions are set correctly because I can open HTML files.
When framework is involved i receive this exception:
System.Security.Policy.PolicyException: Required permissions cannot be
acquired.
It happens on file 'Microsoft.ApplicationBlocks.
Trace below.
I already tried to specify Full Trust in Webconfig.
Do you have any idea?
Thank you very much.
Andrea
Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission) +5343916
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +115
[FileLoadException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +465
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +181
System.Reflection.Assembly.Load(String assemblyString) +42
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +190
[ConfigurationErrorsException: Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +3642024
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +402
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
+155
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +36
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +235
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName) +76
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories, Boolean isDirectoryAllowed) +2944151
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath
virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet
excludedSubdirectories) +204
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +613
[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+79
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +2943544
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1163
[HttpException (0x80004005): Could not load file or assembly
'Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +2739623
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
+2739533