Failed to initialize the AppDomain:/LM/W3SVC/1/Root/WebSite1

1178
Views
1
Answers

I get this following error when deploying a web application in IIS

Event Source: ASP.NET 2.0.50727.0
Failed to initialize the AppDomain:/LM/W3SVC/1/Root/WebSite1

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.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)

Can any one let me know the solution?

edit | flag
William Patrick
Asked on: Sep 15, 2011 at 7:57PM

1 Answers

58
4
58

Try these steps:
1. Uninstall the IIS
2. Restart the machine
3. Install the IIS
4. Restart the machine
5. Re-register the asp.net : using aspnet_regiis.exe -i

Open command prompt and navigate to

C:\windows\microsoft.net\framework\v2.0.50727 

run the following command: aspnet_regiis.exe -u

run the following command: aspnet_regiis.exe -i

Or

IUSER_MACHINENAME (Internet Guest Account)
ASPNET (ASP.NET Machine Account)

With Read & Execute, List Folder Contents and Read permissions.

Hope this helps!!

edit | flag
Gokul A
Answered on: Sep 15, 2011 at 8:12PM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags