简体   繁体   English

HTTP 错误 503。该服务在 IIS 中不可用?

[英]HTTP Error 503. The service is unavailable in IIS?

I published my Web Api (framework 4.5) in this path C:\\inetpub\\wwwroot\\MyWebAPI我在此路径 C:\\inetpub\\wwwroot\\MyWebAPI 中发布了我的 Web Api(框架 4.5)

In my IIS i converted this folder to an app在我的 IIS 中,我将此文件夹转换为应用程序

When i try to access this URL http://localhost/MyWebAPI/api/client/1 a message appears当我尝试访问此 URL http://localhost/MyWebAPI/api/client/1 时会出现一条消息

Service Unavailable服务不可用

HTTP Error 503. The service is unavailable. HTTP 错误 503。该服务不可用。

Why?为什么?

My App Pool is set to be "STOP", i turn it on but it goes back to "STOP"我的应用程序池设置为“停止”,我打开它但它又回到“停止”

I found the solution我找到了解决方案

  • Click on Application Pools under the tree with your machine name,单击带有您的机器名称的树下的应用程序池,
  • on the right side, click click on Advanced Settings,在右侧,点击高级设置,
  • in Process Model change the "Load User Profile" to false在流程模型中将“加载用户配置文件”更改为 false
  • Start your application and restart your IIS启动您的应用程序并重新启动您的 IIS

The error will surely change, in my case the error changed to this one错误肯定会改变,在我的情况下,错误变成了这个

"Config Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false"." “配置错误:此配置部分不能在此路径上使用。当该部分在父级别锁定时会发生这种情况。锁定是默认情况下(overrideModeDefault="Deny"),或由具有 overrideMode="的位置标记显式设置拒绝”或遗留的 allowOverride="false"。”

I have found the solution for this other problem here Config Error: This configuration section cannot be used at this path我在这里找到了另一个问题的解决方案Config Error: This configuration section cannot be used at this path

This is a fairly old thread, but I stumbled across it with the same issue.这是一个相当古老的线程,但我偶然发现了同样的问题。 For me, the resolution was to reset the App Pool user.对我来说,解决方案是重置 App Pool 用户。 I was starting the site, but the app pool would just stop.我正在启动该网站,但应用程序池会停止。 No logs, nothing.没有日志,什么都没有。 I recently had to change my windows password and the app pool user (me) was using the old password :-)我最近不得不更改我的 Windows 密码,而应用程序池用户(我)正在使用旧密码 :-)

(note my website continued to work for a few days with the old password until I did an iisreset which is when the problem started) (请注意,我的网站使用旧密码继续工作了几天,直到我执行了 iisreset 问题才开始)

Run the following commands in PowerShell in administrator mode.在 PowerShell 中以管理员模式运行以下命令。

  1. Stop-Service -Force WAS停止服务-Force WAS
  2. Remove-Item -Recurse -Force C:\\inetpub\\temp\\appPools* Remove-Item -Recurse -Force C:\\inetpub\\temp\\appPools*
    • If the above command not working, delete files manually.如果上述命令不起作用,请手动删除文件。
  3. Start-Service W3SVC启动服务 W3SVC

您可能会停止应用程序池,启动它,错误就会消失。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS 停止并出现错误消息“HTTP 错误 503。服务不可用” - IIS stopped and error message "HTTP Error 503. The service is unavailable" HTTP 错误 503。服务不可用。 应用程序池在访问网站时停止 - HTTP Error 503. The service is unavailable. App pool stops on accessing website HTTP错误503。当端口80已空闲时,该服务不可用 - HTTP Error 503. The service is unavailable when port 80 is already free 仅当使用NetworkService时,站点才不会使用ApplicationPoolIdentity在本地启动:“ HTTP错误503。该服务不可用。” - Site wont start on local using ApplicationPoolIdentity, only when using NetworkService: “HTTP Error 503. The service is unavailable.” Visual Studio IIS HTTP 503 服务不可用 - Visual Studio IIS HTTP 503 Service Unavailable HTTP 503:服务不可用 - HTTP 503 : Service Unavailable 使用 ApplicationPoolIdentity 或自定义帐户时,IIS8“HTTP 错误 503 - 服务不可用”,但在使用 NetworkService 时则不然 - IIS8 'HTTP Error 503 - Service unavailable' when using ApplicationPoolIdentity or a custom account, but not when using NetworkService 在IIS中托管(503服务不可用) - Hosting in IIS (503 Service Unavailable) HttpListener服务器返回错误:(503)服务不可用 - HttpListener server returns an error: (503) Service Unavailable 尝试浏览信号器/集线器时,HTTP 503服务不可用 - HTTP 503 Service is unavailable when trying to browse signalr/hubs
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM