14 June 2008

Resolving Asp.Net EventID 1334

If you are seeing Event ID 1334, with a similar message:

Failed to initialize the AppDomain:/LM/W3SVC/99999999/Root

Exception:
System.IO.FileLoadException

Message: Could not load file or assembly
'System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Access is
denied.
StackTrace: at
System.Reflection.Assembly._nLoad(AssemblyName
fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean
forIntrospection)
at
System.Reflection.Assembly.nLoad(AssemblyName
fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean
forIntrospection)
at
System.Reflection.Assembly.InternalLoad(AssemblyName
assemblyRef, Evidence
assemblySecurity, StackCrawlMark& stackMark,
Boolean forIntrospection)
at
System.Reflection.Assembly.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.CreateInstance(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)

Make sure that you have added the proper accounts with File System permissions to your web folder. On Windows 2003 with IIS6, these should be (for a default setup): Network Services (Make sure it is Network Services and not just Network), ASPNET, IUSR_ and IWAM_.

1 comment:

Rick Taylor said...

YES!

Was creating an FBA site on SharePoint and this was the answer *EXCEPT* its Network Service (not Network Services)