The application domain cannot be created in ASP. NET, so the request cannot be resolved.

Source: Internet
Author: User


A few days ago, an ASP. NET Website was deployed for the company. The website passed the local test and was published and browsed on the local machine. However, after the application is deployed on the server, the error message failed to execute the request because the application domain cannot be created. Then, the error message is found through the Event Viewer:
1: failed to execute the request because the application domain cannot be created. Error: 0x80070005 Access denied.
2: failed to initialize AppDomain:/LM/W3SVC/1635210705/Root
Exception: System. IO. FileLoadException
Message: failed to Load file or assembly "System. Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. Access denied.
StackTrace:
In System. Reflection. Assembly. nLoad (AssemblyName fileName, String codeBase, evi1_assemblysecurity, Assembly locationHint, StackCrawlMark & stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
In System. Reflection. Assembly. InternalLoad (AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospection)
In System. Reflection. Assembly. InternalLoad (String assemblyString, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospection)
In System. activator. createInstance (String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object [] args, CultureInfo culture, Object [] objects, Evidence securityInfo, StackCrawlMark & stackMark)
In System. Activator. CreateInstance (String assemblyName, String typeName)
In System. AppDomain. CreateInstance (String assemblyName, String typeName)
In System. AppDomain. CreateInstance (String assemblyName, String typeName)
In System. Web. Hosting. ApplicationManager. CreateAppDomainWithHostingEnvironment (String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
In System. Web. Hosting. ApplicationManager. CreateAppDomainWithHostingEnvironmentAndReportErrors (String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
Then you can query the solution through GOOGLE:
1. Register IIS again. Run aspnet_regiis.exe in netframeworkv2.0.50727and register it again.
Uninstall:. net aspnet_regiis.exe-u
Reinstall: aspnet_regiis.exe-I
2. After 2.0 is installed, check whether the ASP. NET label in the attribute settings of the IIS virtual directory is 2.0.
3. Permission issues:
(1) Check the properties of the application pool and check the user identity of the application pool, which is generally the network service.
(2) Make sure that this user has the permission to access the. NET Framework 2.0 Directory: systemroot: WindowsMicrosoft. NETFrameworks2.0.xxxx
(3) ensure that the user has access to the virtual directory.
The reason why 3.3 is marked in red is that when I solve the problem, I checked the previous steps, but ignored the virtual directory access permission, as a result, it took an afternoon to solve the problem and finally solved the problem.
If you have encountered similar problems, check them carefully. Maybe the problem lies in your negligence.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.