IISRESET windows 10 (IIS 10) Access denied

Viewed 7000

I'm just wondering, why I get error during an iisreset in my development machine. When I execute the command in a Command Prompt some times it wokrs,sometimes it throws an Access Denied Error, and sometimes it throws a file not found exception.

enter image description here

If anyone finds a solution to this anoying problem, I would appreciate a hint how to get rid of it.

In the IIS I'm just hosting an .NET 4.6.1 MVC site.

4 Answers

This stupid error happens randomly and was very annoying especially when you place iisreset inside a script and assume it will do its thing; took me a while to figure it out. It is not related to the service being stopped as can be seen in this picture:

enter image description here

The only thing I use now is:

net stop W3SVC

and

net start W3SVC

Haven't had a problem since then.

I think it says that he was unable to start the service, mainly due to a Problem with authorization. The solution of the problem can be provided in several different ways

1- Configuration causing the authorization error can be corrected applicationHost.config with XML

2- This authorization can be revoked through the Windows register. Example approach here:

https://stackoverflow.com/a/21036837/914284

3- Machine configuration can be changed in accordance with this permission. Please continue with the option that suits you :)

https://knowledge.digicert.com/solution/SO1360

i hope it will resolve

Specifying the machine name also helps in some scenarios:

iisreset %ComputerName%
Related