[英]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我找到了解决方案
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 中以管理员模式运行以下命令。
您可能会停止应用程序池,启动它,错误就会消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.