Server Error in '/' Application. While accessing web site which is hosted on a shared network path (filer)

-1

I am getting below error while accessing a web sites ,which is hosted on network filer. see i am using .net 2 application pool for application resources. under the same .net application pool i deployed two web sites . Let say web 1 and web 2 as an example. here web 1 config files and assemblies i deployed on a local systems C:\inetpub\wwwroot\folderx. For Web2 i hosted the resources on a network filer \share.test.com\test$\folderx and these content are the copied from the systems location C:\inetpub\wwwroot\folderx (copied folderx folder from system C:\inetpub\wwwroot) and i used a domain account frdomain\iisaccount to grant control on IIS to access these resources. My case the web site Web 1 which is hosted on local system is working fine . But i am agetting below mentioned error when i am accessing the web site which hosted on the network filer. Any thoughts .Filer side access are fine . tested and worked .But ASP.net2 is throwing erros . this is i hosted on windows 2012 server (IIS.8)

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.PolicyException: 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.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7614163 System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

[FileLoadException: Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' 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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232 System.Web.Compilation.BuildManager.CompileGlobalAsax() +51 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Could not load file or assembly 'ChilkatDotNet2, Version=8.7.0.0, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8999027 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333

Version Information: Microsoft .NET Framework Version:2.0.50727.6421; ASP.NET Version:2.0.50727.6427

asp.net
.net
iis
permissions
required
asked on Stack Overflow Sep 7, 2015 by Sanjay M • edited Sep 7, 2015 by Izzy

1 Answer

0

Download and Run ProcessMonitor a microsecond before you (F5) compile, stop trace, filter by 'file system' (ie turn off real time registry, process activity) and export just the HDD activity as csv. Open the csv in excel > data tab > in the results column Filter by 'path not found'.

You need to know where VS is looking for the ChilkatDotNet2 dll and either put the dll in that location or fix the assembly ref

answered on Stack Overflow Sep 7, 2015 by Jeremy Thompson

User contributions licensed under CC BY-SA 3.0