Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IISRESET windows 10 (IIS 10) Access denied

Tags:

iis-10

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.

like image 406
CodeHacker Avatar asked Mar 18 '16 12:03

CodeHacker


2 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.

like image 66
Dan M Avatar answered Sep 19 '22 15:09

Dan M


I got exactly the same error time ago. Running it in German too. Take a look at this article: https://techcommunity.microsoft.com/t5/iis-support-blog/iis-reset-issue-restart-attempt-failed/ba-p/1031976

Judging from @Giorgi Nakeuri's question about the event logs. The "World Wide Web Publishing" (called only "WWW-Publishingdienst" in German) is very likely not running. You need to start it. The "Windows activity process service" fails because of the first one failing.

like image 36
adelriosantiago Avatar answered Sep 22 '22 15:09

adelriosantiago