blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Matt Hall's Blog

Experiences with Microsoft technologies in particular BizTalk 2004, BizTalk 2006, .NET and SQL Server.

WCF - Failed to execute request because the App-Domain could not be created

This is really a note to self, as I have a habit of forgetting the numerous issues I have overcome and feel my blog can be a great repository for such information, as it may also assist someone else out there. I haven't been as rigorous with this as I should have recently. Well, for a long time actually!

Anyway, quite a simple one really, but one I have managed to forget. If you are setting up a new WCF web service hosted within IIS you may receive errors such as that below:

Event Type: Error
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1088
Description:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied.

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: None
Event ID: 1073
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1/Root/<your app domain>

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

I am sure there are other reasons for receiving these errors, but the times I have come across it have been due to the account defined withint the associated application pool not having read permission to the application's web.config file.

Published 29 January 2008 10:32 by Matthew.Hall
Filed under: , ,

Comments

 

Web Hosting » Blog Archive » WCF - Failed to execute request because the App-Domain could not be… said:

PingBack from http://blogspace4you.info/?p=6589
January 29, 2008 12:15
 

jamie.thomson said:

welcome back :)

January 29, 2008 15:25
 

Sunil said:

I just ran across this too. It only affects my web services. Two options I see available are 1) switch to one of the usr configurable accounts (e.g. IWAM) or 2) give NETWORK access to each individual web service directory.
February 12, 2008 19:17
New Comments to this post are disabled
Powered by Community Server (Personal Edition), by Telligent Systems