Everytime I try to debug my asp.net website I get this error:
Unable to launch the IIS Express Web server.
Failed to register URL "http://localhost:50010/" for site "SociopackWebAPI" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)
In eventviewer I noticed this error in the log:
The worker process for app pool 'Clr4IntegratedAppPool', PID='13248', failed to initialize the http.sys communication when asked to start processing http requests and therefore will be considered ill by W3SVC and terminated. The data field contains the error number.
I assume this means my Clr4IntegratedAppPool does not have enough rights? How can I fix thi?
This issue was a point in time issue that occurred when upgrading between the RCs of Visual Studio 2017 that caused IIS Express to get uninstalled. The issue has since been fixed and you upgrading Visual Studio will solve the problem.
1) In Solution Explorer, right click the your project and click Properties. 2) In the left tab, click Web. 3) Select IIS Express, check out your Project Url, then create Virtual Directory.
One reason for the IIS Express being unable to start properly can be that the port it wants to use is reserved. The port you want to use will not show up in netstat -an | findstr <your port number>
if it is not in use.
You can either change the port you use or remove the reservation.
View reservations (elevated command prompt): netsh int ipv4 show excludedportrange protocol=tcp
Protocol tcp Port Exclusion Ranges
Start Port End Port
---------- --------
80 80
443 443
50000 50059 *
* - Administered port exclusions.
You can remove the reserved range if it is not in use with netsh int ipv4 delete excludedportrange protocol=tcp startport=50000 numberofports=60
. Should reply Ok.
If you get Access denied.
it is because the range is currently in use. You will have to shut down the program that use the ports in order to create a reservation that intersects with the range.
If you want to create the range again, use netsh int ipv4 add excludedportrange protocol=tcp startport=50000 numberofports=60
.
I had this problem because I recently installed Hyper-V and Docker and my IIS Express threw error events in my event log with ID 2269:
The worker process for app pool 'Clr4IntegratedAppPool', PID='12345', failed to initialize the http.sys communication when asked to start processing http requests and therefore will be considered ill by W3SVC and terminated. The data field contains the error number.
And subsequently 2276:
The worker process failed to initialize correctly and therefore could not be started. The data is the error.
Source of my solution: Docker for Windows – Port Reservations | Developer Musings
I had exactly the same problem with VS2017 / IIS Express 10. Tried a few tips & tricks found at forums, but the only one that really fixed the bug definitively is the following:
If you cannot find your solution for this, try this:
Regedit
Go to the following path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
Change the value of name Start
from 4
to 3
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With