windows IIS w3svc 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21023622/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:14:15  来源:igfitidea点击:

IIS w3svc error

windowshttpiisservice

提问by Asad Malik

I am trying to start my website in IIS, whenever I try to start my website I get the following error

我试图在 IIS 中启动我的网站,每当我尝试启动我的网站时,我都会收到以下错误

Cannot start service w3svc on computer

无法在计算机上启动服务 w3svc

I tried to start "World wide web publishing service", but I was unable to start it as it said:

我试图启动“万维网发布服务”,但我无法启动它,因为它说:

Error 1068: The dependency service or group failed to start

错误 1068:依赖服务或组无法启动

Meanwhile when I checked my log I found this error,

同时,当我检查我的日志时,我发现了这个错误,

The World Wide Web Publishing Service service depends on the HTTP service which failed to start because of the following error:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

World Wide Web Publishing Service 服务依赖于 HTTP 服务,
该服务因以下错误而无法启动:无法启动该服务,因为它已被禁用或没有与之关联的已启用设备。

Please help me, I am badly caught with this error, I have spent a week researching this error but haven't found a solution yet.

请帮帮我,我被这个错误深深地抓住了,我花了一个星期研究这个错误,但还没有找到解决方案。

回答by Asad Malik

Well finally after a week struggle, I came to a solution. I am listing down the steps which I followed to solve my error:

好吧,经过一周的斗争,我终于找到了解决方案。我列出了我为解决错误而遵循的步骤:

  1. Confirm that "Windows Management Instrumentation" is started and its start up type is set to automatic.

  2. Also make sure the following dependency services are started for World Wide Web Publishing Service:

    • Windows Process Activation Service
    • Remote Procedure Call (RPC)
    • DCOM Server Process Launcher
    • RPC Endpoint Mapper.
  3. Open regedit, navigate to [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP]:
    a) Double click on Startand change value data from 4(disabled) to 3(automatically).
    b) Delete "NoRun"key if this key exists.

  4. (warning: backup any IIS website configuration first). UN-install "Internet information Service" and "Windows process activation service(if it is already installed)" from "Turn windows feature on or off" and Restart your PC.

  5. Type the below command in CMD and press enter:

    net start http
    
  1. 确认“Windows Management Instrumentation”已启动且其启动类型设置为automatic

  2. 还要确保为万维网发布服务启动了以下依赖服务:

    • Windows 进程激活服务
    • 远程过程调用 (RPC)
    • DCOM 服务器进程启动器
    • RPC 端点映射器。
  3. 打开 regedit,导航到[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP]
    a) 双击Start并将值数据从4(禁用)更改为3(自动)。
    b)"NoRun"如果该键存在,则删除该键。

  4. (警告:首先备份任何 IIS 网站配置)。从“打开或关闭 Windows 功能”中卸载“Internet 信息服务”和“Windows 进程激活服务(如果已安装)”并重新启动您的 PC。

  5. 在 CMD 中输入以下命令并按回车键:

    net start http
    

Now it will notify you that service is already running.

现在它会通知您服务已经在运行。

  1. Re-install Internet information Service from "Turn windows feature on or off".

  2. Start IIS and my websites are started now, no more "w3svc service is not running error."

  1. 从“打开或关闭 Windows 功能”重新安装 Internet 信息服务。

  2. 启动 IIS,我的网站现在启动,不再出现“w3svc 服务未运行错误”。

回答by ParPar

As for me - I just restarted the computer.

至于我 - 我刚刚重新启动了计算机。

回答by dileepar

Make sure these 2 services running and their startup type is automatic.If they disabled and not running right click on them and go to properties and change from there.

确保这两个服务正在运行并且它们的启动类型是自动的。如果它们被禁用并且没有运行,请右键单击它们并转到属性并从那里更改。

  1. Windows process activation service
  2. Worldwide web publishing service.
  1. Windows 进程激活服务
  2. 全球网络发布服务。

回答by khayam

Run cmd as administrator. Type iisreset. That's it.

以管理员身份运行cmd。键入iisreset。就是这样。

回答by Kamran

Go to Task Manager --> Processes and manually stop the W3SVC process. After doing this the process should start normally when restarting IIS

转到任务管理器 --> 进程并手动停止 W3SVC 进程。执行此操作后,重新启动 IIS 时该进程应正常启动

回答by Fragment

In my case, IIS suddenly stoped working, and after that Windows process activation service was unable to restart.

就我而言,IIS 突然停止工作,此后 Windows 进程激活服务无法重新启动。

The solution to fix this was:

解决此问题的解决方案是:

  1. Find WASservice in the services tab of windows task manager
  2. In context menu choose Go to process
  3. Kill process (its name will be svchost.exe)
  4. Restart Windows process activation service
  1. 在 windows 任务管理器的服务选项卡中找到WAS服务
  2. 在上下文菜单中选择Go to process
  3. 杀死进程(它的名字将是 svchost.exe)
  4. 重新启动 Windows 进程激活服务

Hope it will be usefull.

希望它会很有用。

回答by Shahid Iqbal

In my case it was C:\Windows\System32\inetsrv\config\applicationHost.config which had an issue. I had a "system.web" section in this file which was causing the problem. Removed the section and everything started working

就我而言,它是 C:\Windows\System32\inetsrv\config\applicationHost.config 有问题。我在这个文件中有一个“system.web”部分导致了这个问题。删除了该部分,一切都开始工作了

回答by Kapil Palria

I have got same issue on my server. Follow below steps -

我的服务器上有同样的问题。请按照以下步骤操作 -

  1. Open command prompt (run as administrator)
  2. type IISReset and enter.
  1. 打开命令提示符(以管理员身份运行)
  2. 键入 IISReset 并输入。

It works and solved my problem.

它有效并解决了我的问题。

回答by MK446

I have had this problem after a windows update. Windows Process Activation Service is dependent service for W3SVC. First, make sure that Windows Process Activation Service is running. In my case, it was not running and when I tried to run it manually, I got below error.

我在 Windows 更新后遇到了这个问题。Windows 进程激活服务是 W3SVC 的依赖服务。首先,确保 Windows 进程激活服务正在运行。就我而言,它没有运行,当我尝试手动运行它时,出现以下错误。

Windows Process Activation Service Error 2: The system cannot find the file specified

Windows 进程激活服务错误 2:系统找不到指定的文件

The issue seems to be, that windows adds an incorrect parameter to the WAS service startup parameters. I fixed the issue using the following steps:

问题似乎是,Windows 向 WAS 服务启动参数添加了不正确的参数。我使用以下步骤解决了这个问题:

  • Start regedit (just type it into start) Navigate to

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters

  • Delete the NanoSetup variable. This variable is preventing WAS from starting

  • Start the WAS service using task manager

  • Now start the W3SVC service

  • You can now start your website in IIS again

  • 启动 regedit(只需在 start 中输入)导航到

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WAS\Parameters

  • 删除 NanoSetup 变量。此变量阻止 WAS 启动

  • 使用任务管理器启动 WAS 服务

  • 现在启动 W3SVC 服务

  • 您现在可以再次在 IIS 中启动您的网站

I found above WPA service solution in thisstack overflow thread.

我在堆栈溢出线程中找到了上述 WPA 服务解决方案。

回答by Austin Wasinger

None of the answers above helped me.

上面的答案都没有帮助我。

It turns out my Net.Tcp Port Sharing Servicewas disabled. I changed its startup to manual, started the service, and then IISRESET worked.

原来我的Net.Tcp 端口共享服务被禁用了。我将其启动更改为手动,启动服务,然后 IISRESET 工作

I also verified that the following dependent services were started in Services ([windows]+[r] services.msc):

我还验证了以下依赖服务是在Services([windows]+[r]services.msc)中启动的:

  • World Wide Web Publishing Service
  • Windows Process Activation Service
  • Remote Procedure Call (RPC)
  • DCOM Server Process Launcher
  • RPC Endpoint Mapper
  • Net.Msmq Listener Adapter
  • Net.Pipe Listener Adapter
  • Net.Tcp Listener Adapter
  • Net.Tcp Port Sharing Service
  • 万维网发布服务
  • Windows 进程激活服务
  • 远程过程调用 (RPC)
  • DCOM 服务器进程启动器
  • RPC 端点映射器
  • Net.Msmq 侦听器适配器
  • Net.Pipe 侦听器适配器
  • Net.Tcp 侦听器适配器
  • Net.Tcp 端口共享服务

I found this solution by going through all dependencies and child dependencies of the World Wide Web Publishing Serviceand making sure that each service was enabled and started.

我通过检查万维网发布服务的所有依赖项和子依赖项并确保每个服务都已启用和启动,找到了这个解决方案。

To verify all services for yourself, do the following:

要自行验证所有服务,请执行以下操作:

  1. Open up Services(just search for it from the start menu in Windows 10)
  2. Find the World Wide Web Publishing Service
  3. Right click on the service and then click "Properties"
  4. Click on the Dependenciestab
  5. Go through each system component in the two boxes and verify that each service is started (in Services).
  6. Repeat steps 3-5 for each of the dependencies' dependencies until you run out of child dependencies
  1. 打开服务(只需从 Windows 10 的开始菜单中搜索它)
  2. 查找万维网发布服务
  3. 右键单击该服务,然后单击“属性
  4. 单击依赖项选项卡
  5. 检查两个框中的每个系统组件并验证每个服务是否已启动(在服务中)。
  6. 对每个依赖项的依赖项重复步骤 3-5,直到用完子依赖项

Service Properties - Dependencies Tab

服务属性 - 依赖项选项卡