Hi, have been researching this for a while with no luck.
Error when accessing an asp app in a W2008 Server IIS7, Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927.
----
Server Error in '/' Application.
Required permissions cannot be acquired.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Policy.Pol
icyExcepti
on: Required permissions cannot be acquired.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityMa
nager.Reso
lvePolicy(
Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +10238142
System.Security.SecurityMa
nager.Reso
lvePolicy(
Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +97
[FileLoadException: Could not load file or assembly 'Microsoft.Practices.Enter
priseLibra
ry.Logging
, Version=2.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(As
semblyName
fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly
.InternalL
oad(Assemb
lyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
System.Reflection.Assembly
.InternalL
oad(String
assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
System.Reflection.Assembly
.Load(Stri
ng assemblyString) +35
System.Web.Configuration.C
ompilation
Section.Lo
adAssembly
Helper(Str
ing assemblyName, Boolean starDirective) +190
[ConfigurationErrorsExcept
ion: Could not load file or assembly 'Microsoft.Practices.Enter
priseLibra
ry.Logging
, Version=2.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.C
ompilation
Section.Lo
adAssembly
Helper(Str
ing assemblyName, Boolean starDirective) +11207304
System.Web.Configuration.C
ompilation
Section.Lo
adAllAssem
bliesFromA
ppDomainBi
nDirectory
() +388
System.Web.Configuration.C
ompilation
Section.Lo
adAssembly
(AssemblyI
nfo ai) +232
System.Web.Configuration.A
ssemblyInf
o.get_Asse
mblyIntern
al() +48
System.Web.Compilation.Bui
ldManager.
GetReferen
cedAssembl
ies(Compil
ationSecti
on compConfig) +210
System.Web.Compilation.Bui
ldProvider
sCompiler.
.ctor(Virt
ualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
System.Web.Compilation.Cod
eDirectory
Compiler.G
etCodeDire
ctoryAssem
bly(Virtua
lPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +11196482
System.Web.Compilation.Bui
ldManager.
CompileCod
eDirectory
(VirtualPa
th virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185
System.Web.Compilation.Bui
ldManager.
EnsureTopL
evelFilesC
ompiled() +650
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Practices.Enter
priseLibra
ry.Logging
, Version=2.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.Bui
ldManager.
ReportTopL
evelCompil
ationExcep
tion() +76
System.Web.Compilation.Bui
ldManager.
EnsureTopL
evelFilesC
ompiled() +1012
System.Web.Hosting.Hosting
Environmen
t.Initiali
ze(Applica
tionManage
r appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParamete
rs hostingParameters) +1025
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Practices.Enter
priseLibra
ry.Logging
, Version=2.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.Fir
stRequestI
nit(HttpCo
ntext context) +11301302
System.Web.HttpRuntime.Ens
ureFirstRe
questInit(
HttpContex
t context) +88
System.Web.HttpRuntime.Pro
cessReques
tInternal(
HttpWorker
Request wr) +11174792
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
----
Site is running with FULL .NET trust level, so no issue with this that seems to be quite often the cause of the problem.
Directions on where to move from here ? There seems to be no clear answer around.
Thx,
Pere