据我所知,此错误通常是由 Reporting Services 引起的,但此服务器上未安装 Reporting Services。您知道为什么 net stop http 无法完全正常工作吗?
C:\Users\Administrator>net stop http
The following services are dependent on the HTTP service.
Stopping the HTTP service will also stop these services.
Web Management Service
World Wide Web Publishing Service
Print Spooler
Web Deployment Agent Service
Function Discovery Resource Publication
Do you want to continue this operation? (Y/N) [N]: y
The Web Management Service service is stopping.
The Web Management Service service was stopped successfully.
The World Wide Web Publishing Service service is stopping.
The World Wide Web Publishing Service service was stopped successfully.
The Print Spooler service is stopping.
The Print Spooler service was stopped successfully.
The Web Deployment Agent Service service is stopping.
The Web Deployment Agent Service service was stopped successfully.
The Function Discovery Resource Publication service is stopping.
The Function Discovery Resource Publication service was stopped successfully.
The HTTP service is stopping........
The HTTP service could not be stopped.
答案1
从:http://support.microsoft.com/kb/2597817
请考虑以下场景。您正尝试在运行 Internet Information Services (IIS) 6、7 或 7.5 的服务器上停止 HTTP 服务。该服务器还安装了 Microsoft Web 部署服务 (MSDEPSVC)。当您尝试使用 NET STOP HTTP 命令行指令停止 HTTP 服务时,命令提示符中会显示以下错误消息:
The HTTP service is stopping.....
The HTTP service could not be stopped.
如果再次运行 NET STOP HTTP 命令,则会显示以下消息:
The service is starting or stopping. Please try again later.
答案2
您可以使用 sysinternals 的进程资源管理器查看哪些文件锁定了该进程。另外,您是否检查过您的防病毒软件是否锁定了该进程?
答案3
如果您恰好有自托管 Web 服务正在运行,请先停止它们,然后再运行 net stop http。这也能解决问题。这只是“服务正在启动或停止。请稍后重试。”的症状之一。
就我的情况而言,MS KB 文章中解释了解决方案 http://support.microsoft.com/kb/2597817,没有用。这是因为我的机器上没有所述服务“Get-Service:找不到任何服务名称为‘MsDepSvc’的服务。”
答案4
我为此苦苦挣扎了很久,但还是找不到停止 HTTP 服务的解决方案。我尝试过更换
net stop http /y
和
iisreset /stop
在大多数情况下,它都能完成工作。在其余情况下,解决方法是重新启动系统。