此时服务无法接受控制消息

我刚刚停止了 IIS 中的应用程序池。当试图启动它时,IIS 抱怨说,

此时,服务无法接受控制消息。(来自 HResult T: 0x80080425的异常)。

怎么了? 为什么出错了吗?

查看事件查看器 > 系统显示以下警告:

工作进程“1456”服务应用程序池“ MyAppPool”未能在分配的时间内停止协议“ http”的侦听器通道。数据字段包含错误号。

服务应用程序池“ MyAppPool”的进程与 Windows 进程激活服务发生了致命的通信错误。进程 ID 是“10592”。数据字段包含错误号。

服务应用程序池“ MyAppPool”的进程在关闭期间超过了时间限制。进程 ID 为“10516”。

大约5分钟后,这个问题自行解决了,我们试图重新启动网站,结果收到:

万维网发布服务(W3SVC)已停止。除非运行万维网发布服务(W3SVC) ,否则无法启动网站。

所以,我们开始了 W3SVC 服务,然后我们可以开始我们的网站。

153659 次浏览

The error message could result due to the following reason:

  1. The service associated with Credential Manager does not start.
  2. Some files associated with the application have gone corrupt.

Please follow the steps mentioned below to resolve the issue:

Method 1:

  1. Click on the “Start”
  2. In the text box that reads “Search Program and Files” type “Services”
  3. Right click on “Services” and select “Run as Administrator”
  4. In the Services Window, look for Credential Manager Service and “Stop” it.
  5. Restart the computer and “Start” the Credential Manager Service and set it to “Automatic”.
  6. Restart the computer and it should work fine.

Method 2: 1. Run System File Checker. Refer to the link mentioned below for additional information: http://support.microsoft.com/kb/929833

This helped me: just wait about a minute or two.

Wait a few minutes, then retry your operation.

Ref: https://msdn.microsoft.com/en-us/library/ms833805.aspx

In my case, the VS debugger was attached to the w3wp process. After detaching the debugger, I was able to restart the Application Pool

I killed related w3wp.exe (on a friends' advise) at task manager and it worked.

Note: Use at your own risk. Be careful picking which one to kill.

Being impatient, I created a new App Pool with the same settings and used that.

I kept having this problem whenever I tried to start an app pool more than once. Rather than rebooting, I simply run the Application Information Service. (Note: This service is set to run manually on my system, which may be the reason for the problem.) From its description, it seems obvious that it is somehow involved:

Facilitates the running of interactive applications with additional administrative privileges. If this service is stopped, users will be unable to launch applications with the additional administrative privileges they may require to perform desired user tasks.

Presumably, IIS manager (as well as most other processes running as an administrator) does not maintain admin privileges throughout the life of the process, but instead request admin rights from the Application Information service on a case-by-case basis.

Source: social.technech.microsoft.com

I forgot I had mine attached to Visual Studio debugger. Be sure to disconnect from there, and then wait a moment. Otherwise killing the process viewing the PID from the Worker Processes functionality of IIS manager will work too.

I stopped the IIS Worker Process (in task manager), and then started the IIS again. It worked.

Restarting the IIS windows service (World Wide Web Publishing Service) and then starting the application pool has worked for me. However, as the top answer suggests it may have just been the waiting that caused it to subsequently work.

Restarting the machine worked for me but not every time.

If you are really stuck on this then follow below steps

  1. Open Task Manager
  2. A window will open. Click on Details tab.
  3. Search for the process name you wanted to restart/stop.
  4. Select process, right click on it, select End task option.
  5. A confirmation dialog box will appear. Click on End process button.
  6. Now try to restart your service from Services.msc window.

I had this issue recently,

Problem statement: Mine was a windows service that I run locally by attaching VS debugger. When I stop debugging and try to restart/stop the service (under services.msc) I used to get the mentioned error.

Solution:

  1. Open up Task manager.
  2. Search for the service (based on the exe name and not service name, for those that are different).
  3. Kill the service.

On doing the above the service is stopped.