服务不可用 - 应用程序池无法启动

7
我有一个WCF Web服务,它位于IIS上的应用程序池中。
最近,当我尝试调用此Web服务时,我一直收到“服务不可用”的消息。我尝试做的第一件事是重新启动应用程序池。我这样做了,但几秒钟后,它就崩溃并停止工作了。
查看事件查看器,我发现了这些消息,但目前无法帮助我找到问题所在。

正在为应用程序池'X'提供服务的进程报告了失败。进程ID为'11616'。数据字段包含错误号。

有关更多信息,请参见http://go.microsoft.com/fwlink/events.asp的帮助和支持中心。

在得到了几个这样的消息之后,我得到了这个:

由于处理该应用程序池的进程出现一系列故障,应用程序池“X”正在自动禁用。

有关更多信息,请参见http://go.microsoft.com/fwlink/events.asp的帮助和支持中心。

我已经检查了权限和应用程序池配置,但似乎一切正常。
有人遇到过这种情况吗?
提前致谢。
3个回答

12

查看应用程序池正在运行的身份。如果您将其配置为在域帐户下运行(并且这是在 IIS 6.0 服务器上),请确保该域帐户是本地安全组 "IIS_WPG" 的成员,因为需要成为 IIS_WPG 组的成员才能运行 w3wp.exe 工作进程。


2

看起来有多个可能的根本原因,但在我的情况下,查看应用程序事件日志时,我看到了似乎与此同时发生的不相关事件:

Faulting application name: svchost.exe_wuauserv, version: 6.3.9600.17415, time stamp: 0x54504177
Faulting module name: wuaueng.dll, version: 7.9.9600.17915, time stamp: 0x558b6c14
Exception code: 0xc0000005
Fault offset: 0x00000000002b694f
Faulting process id: 0x297c
Faulting application start time: 0x01d0b52047cfa008
Faulting application path: C:\windows\system32\svchost.exe
Faulting module path: c:\windows\system32\wuaueng.dll
Report Id: 87e1370b-2113-11e5-827d-a0d3c1241fdb
Faulting package full name: 
Faulting package-relative application ID: 

这是帮助我解决问题的方法(这真的很神奇,我不明白为什么会起作用)。 引自此处

Start / All Programs / Right Click on Command Prompt / Run as Administrator At the command prompt type the following command:

sc config winmgmt type=  own
sc config wuaserv type= own

This will isoloate WMI and Windows Update in their own svchost.exe, this way they won't affect other running services if it crashes again. After further investigation, WMI could also be a victim, since the problem is that OLE probably code uninitialized twice.

该帖子中的另一个人报告说,只有第一条命令对他起作用,尽管问题已经消失:

I followed your directions with the following results.

Sc config winmgmt type= own
SUCCESS
Sc config wuaserv type= own
[SC] OpenService FAILED 1060:
The specified service does not exist as an installed service.

Although one of the commands failed, I am no longer getting the host error message


1

你可以尝试以下几件事情:

  1. 在IIS中创建一个单独的应用程序池,并在WCF服务中使用该应用程序池。这样,应用程序池完全专用于WCF,不会抛出任何错误。

  2. 你是否正在使用内置的“网络服务”、“本地服务”或“本地系统”作为应用程序池标识?如果是,请尝试设置一个服务帐户并将其用于应用程序池标识。

希望这可以帮助到你!


谢谢您的回复。有几个网络服务,每个网络服务都有一个应用程序池。它们使用服务账户运行。 - born to hula

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接