Last post Aug 03, 2011 02:28 AM by Jsmall
Aug 17, 2010 10:41 AM|njhansen|LINK
Recently updated my system to use Visual Studio 2010, and projects will no longer compile. All of them give the error "Failed to create AppDomain." Intellisense does not work either (except for standard HTML tags), and individual pages will also not compile.
Points of note:
Things I've tried (some obviously shouldn't have any bearing on it, but I've tried just about everything that anyone suggested on any forum I could find, most of which seemed to apply to IIS, not VS):
What am I missing here?
From the application event log:
Failed to initialize the AppDomain:aaef6f88
Message: Failed to create AppDomain.
StackTrace: at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
Message: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
StackTrace: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object args, CultureInfo culture, Object activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object args, CultureInfo culture, Object activationAttributes)
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.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.Setup(Object arg)
at System.AppDomain.nCreateDomain(String friendlyName, AppDomainSetup setup, Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, IntPtr parentSecurityDescriptor)
at System.AppDomainManager.CreateDomainHelper(String friendlyName, Evidence securityInfo, AppDomainSetup appDomainInfo)
at System.AppDomainManager.CreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup appDomainInfo)
at System.AppDomain.InternalCreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup info)
at System.AppDomain.CreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup info)
at System.AppDomain.CreateDomain(String friendlyName, Evidence securityInfo, AppDomainSetup info, PermissionSet grantSet, StrongName fullTrustAssemblies)
at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Aug 30, 2010 10:17 AM|njhansen|LINK
Anybody got any help on this? I've got a colleage who is having the same problem on a fresh install of VS 2010 on a new computer. Uninstalling and re-installing solved the problem for him for a week, and now his problem is back.
Re-installing VS 2010 periodically really isn't an option (and it doesn't work for me even for a short time).
Dec 11, 2010 02:14 PM|Rajeev1111sharma|LINK
I am facing same problem in Visualstudio 2010 . Please help me how i solve this problem ASAP.
.Net framework 4.0
Dec 13, 2010 04:38 AM|fesani|LINK
I have been having the same problem and after a whole day lost reinstalling .net 4 and vs2010 I found a quick work around!.
Change on your web.config the attribute debug to false, run the app without debug, close app and change back your web.config debug to true, run your app again and it will work. The problem shows up from time to time but after I change the web.config all
Hope it helps and please let me know if anyone find another solution.
Dec 15, 2010 11:23 AM|Rajeev1111sharma|LINK
Thankx for reply.
I change my config .
<compilation debug="false" and run app without debug it works but whenever i change it to true then it show same problem again.
Please suggest me any other solution .
Dec 16, 2010 04:03 AM|fesani|LINK
Try to things.
1. Create a fresh new site and test it with framework 3.5 and see if it works.
2.Create a fresh new website with framework 4 and see if it works.
this why you force your app to hook an instance of a debugger, then go back to your site, run it again with debug=true.
Only thing I can suggest is to narrow down the issue this way.
Hope it helps,
Dec 16, 2010 04:54 AM|fesani|LINK
By the way, after youo change the debug=false and run the app dont choose to "Modify web.config", run it first with "run without..."
Dec 20, 2010 12:25 AM|Rajeev1111sharma|LINK
Finally i got particuler solution of this problem .
Remove your antivirus form your system and restrat.
Your problem solved
No need to search other solution it's final solution .
if anything else please let me know .
Jan 04, 2011 05:45 AM|fesani|LINK
what antivirus did you have?
Aug 03, 2011 02:28 AM|Jsmall|LINK
Any one got a solution for this one yet? its bloody annoying.