繁体   English   中英

IIS8 显示错误 503

[英]IIS8 showed error 503

Surface Pro 2 128GB
Win8.1更新1
从 [Turn Windows Features ON/OFF] 安装 IIS8

安装后,
1. IE11访问http://localhost,提示Service Unavailable HTTP 503 Error
2. 启动的 DefaultAppPool 已自动停止..

==========================
我的问题是:
我该如何解决这个错误?

==========================

%windir%\\system32\\logfiles\\httperr:

#Software: Microsoft HTTP API 2.0
#Version: 1.0
#Date: 2014-05-07 03:50:18
#Fields: date time c-ip c-port s-ip s-port cs-version cs-method cs-uri sc-status s-siteid s-reason s-queuename
2014-05-07 03:50:18 ::1%0 1501 ::1%0 80 HTTP/1.1 GET / - 1 Client_Reset DefaultAppPool


#Software: Microsoft HTTP API 2.0
#Version: 1.0
#Date: 2014-05-07 03:51:56
#Fields: date time c-ip c-port s-ip s-port cs-version cs-method cs-uri sc-status s-siteid s-reason s-queuename
2014-05-07 04:07:49 ::1%0 1636 ::1%0 80 HTTP/1.1 GET / 503 1 AppOffline DefaultAppPool
2014-05-07 04:07:55 ::1%0 1637 ::1%0 80 HTTP/1.1 GET / 503 1 AppOffline DefaultAppPool
2014-05-07 04:08:06 ::1%0 1656 ::1%0 80 HTTP/1.1 GET / 503 1 AppOffline DefaultAppPool
2014-05-07 04:08:06 ::1%0 1659 ::1%0 80 HTTP/1.1 GET /favicon.ico 503 1 AppOffline DefaultAppPool
2014-05-07 04:08:06 ::1%0 1660 ::1%0 80 HTTP/1.1 GET /favicon.ico 503 1 AppOffline DefaultAppPool
2014-05-07 04:08:06 ::1%0 1661 ::1%0 80 HTTP/1.1 GET /favicon.ico 503 1 AppOffline DefaultAppPool
2014-05-07 04:12:05 ::1%0 1763 ::1%0 80 HTTP/1.1 GET / 503 1 AppOffline DefaultAppPool

==============================================

我在 EventLog 中发现了一个错误:

USER: IIS APPPOOL\DefaultAppPool

Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, and that your network is functioning correctly.

DETAIL: Only part of a ReadProcessMemory or WriteProcessmemory request was completed

快速修复:

IIS -> 应用程序池 -> DefaultAppPool -> 高级设置 -> 加载用户配置文件 = False

FastcgiTesting-Register 可能需要从 IIS 的模块中删除。 更多信息在这里:

https://blogs.msdn.microsoft.com/vpandey/2009/08/04/http-error-503-the-service-is-unavailable/

经过一番调查,我发现在我的情况下,问题是由应用程序池帐户身份验证问题引起的 我的 ASP NET 应用程序在 Docker 容器上运行,我在其中创建一个无密码管理帐户并配置应用程序池以使用它。

问题是我忘记设置密码过期策略,显然在默认过期期限之后,只要容器重新启动,问题就会开始发生。 所以现在我在脚本中添加了另一个命令以防止密码过期。

这是完整的配置脚本:

# create admin user
NET USER admin /add
NET LOCALGROUP Administrators admin /add
WMIC USERACCOUNT WHERE "Name='admin'" SET PasswordExpires=FALSE

# configure app pool
Import-Module WebAdministration
Set-ItemProperty IIS:/AppPools/DefaultAppPool -name processModel.identityType -Value SpecificUser
Set-ItemProperty IIS:/AppPools/DefaultAppPool -name processModel.userName -Value "admin"
Set-ItemProperty IIS:/AppPools/DefaultAppPool -name processModel.password -Value ""

请注意不要在隔离的容器之外运行它! 因为它创建了一个潜在危险的无密码管理员帐户。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM