-->

IIS doesn't start. Error code: C0000142

2019-07-21 02:05发布

问题:

My site worked perfectly fine. When I restarted IIS (for some scenarios check) - It stopped working, and gave me a page telling me to check the event viewer, there I get the following error:

aspnet_wp.exe could not be started. The error code for the failure is C0000142. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the .NET Framework is correctly installed and that the ACLs on the installation directory allow access to the configured account.

This is NOT an ACL problem.

Any ideas?

回答1:

For some reason, the ApplicationName setting has resetted to an empty string. Once I changed it - the site loaded like in the 'ol good days



回答2:

I receive this error every now and then. I have tried many of the solutions suggested on the web, but never managed to get rid of it.

A work-around I now use, is to simply start aspnet_wp.exe manually before running my ASP.Net application.

Start - Run; Open "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_wp.exe"; OK

So far, this has worked for me every time.

You can try it as a quick solution if you just have to continue working and don't want to spend time analysing the cause.



回答3:

If manually running aspnet_wp.exe doesn't work, just open task manager and kill all instances of explorer.exe, then on the Applications tab of task manager click the "New Task" button and enter explorer.exe. The aspnet_wp.exe process will restart as well.



回答4:

What version of ASP.NET is the service using? Can you try switching to a different version?

What's the output of either of the following commands:

.NET 4

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -lv 

.NET 2.x

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -lv

If anything looks strange, try reinstalling your version of ASP.NET using the -i switch. If that works, then you should also verify your WCF installation using these commands:

.NET 4

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>Service ModelReg.exe -lv

.NET 3.x

C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>Service
ModelReg.exe -lv

If there are any errors reported you can reinstall the appropriate binaries by running -ia