Failed to load file or assembly "System.Web" or one of its dependencies. Access denied

I get an EventLog error that I am not aware of when starting the .NET webapp.

The application mainly reads from the database, and then from the disk (reads the file sizes, and then writes back to the database).

I have an application without problems on my workstation (IISExpress) and on our other server (Windows 2008 with IIS7)

But when I run it on our 2003 R2 server with IIS6, I get odd behavior. The IIS application starts and does not report anything bad, but when I try to access the web page, I get "Server application unavailable" and the EventLog on the server gives me this dump:

Event Type: Error
Event Source:   ASP.NET 4.0.30319.0
Event Category: None
Event ID:   1325
Date:       24.05.2011
Time:       13:29:11
User:       N/A
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1309226359/Root

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.

StackTrace:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
at System.Activator.CreateInstance(AppDomain domain, String assemblyName, String typeName)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

IIS. IIS - . , .NET 4, .NET 4 .

, , System.Web, , ...

web.config :

<?xml version="1.0"?>
<configuration>
    <system.web>
        <globalization culture="nb-NO"/>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
            </compilation>
        <customErrors mode="Off"></customErrors>
        <xhtmlConformance mode="Strict"/>
        <httpRuntime requestValidationMode="2.0"/>
    </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"></modules>
    </system.webServer>
</configuration>
+3
2

-.

, ASPNET Network Service Read & Execute List Folder Contents - .

+2

. , - LOCAL_MACHINE\Users LOCAL_MACHINE\IIS_IUSRS, LOCAL_MACHINE . , , , , .

- Windows 7 Enterprise IIS 7.5.7600.16385 Visual Studio 12

0

All Articles