IIS 应用程序池身份 503 错误

发布于 2024-11-25 09:28:26 字数 1181 浏览 1 评论 0原文

我最近移植到了另一家托管公司 (VDS),并在新服务器上安装了 IIS 7.5 Express、最新版本的 PHP 和 MySQL。

然后,我将文件从旧服务器复制到新服务器(除了网站文件夹的内容之外没有任何内容,因此没有配置文件或除网站本身中的 web.config 之外的任何内容),设置网站。我尝试访问一个网站,收到 503 服务不可用消息,在服务器上尝试了远程和本地,没有任何变化。

在每个网站上都尝试过,甚至在默认网站上也没有变化:仍然是 503。 我已经检查了网站(以及所有子级)文件夹的权限,我的帐户、网络服务、管理员都有效地完全控制了所有内容。

所有应用程序都在 DefaultAppPool 中运行,而 DefaultAppPool 在 ApplicationPoolIdentity 下运行。尝试创建一个新的应用程序池,将网站移动到那里,但没有运气,尝试在池设置中将“加载用户配置文件”设置为 False (在此处阅读安装 SP 后 IIS 7.5 上出现 HTTP 错误 503),无变化。

事件查看器以极其详细的方式表示:

“为应用程序池“DefaultAppPool”提供服务的进程意外终止。进程 ID 为“2356”。进程退出代码为“0xfffffffe”。”

没有别的。此错误五次,池会因快速保护而关闭。我重新启动池,再试一次,没有任何变化。无论我试图获取 .aspx、.php 或静态内容。这是最奇怪的部分:当我将应用程序池设置为在 LocalSystem 下运行时,它可以工作。没问题。但其他一切都失败了。

我检查了网站文件夹大约十次,更改、删除、重新添加权限等尝试了一切,但没有任何改变。就好像有另一个文件我忘记检查池的用户无法访问。但事件查看器对我没有帮助。这是从新服务器开始的,我在安装了所有内容后尝试了,所以我不知道这开始发生了什么。我显然不会在本地系统下运行。即使我自己的用户管理员也不起作用。

唯一有效的身份是 LocalSystem。我的用户、LocalService、NetworkService、ApplicationPoolIdentity 都以同样的方式失败。我快疯了,我 99% 确定这是一个用户权限问题。但所有网站文件都可以访问,并且我没有更改 system32 inetconfig 或任何地方的任何内容。

I've recently ported to a different hosting company (VDS), and on the new server, installed IIS 7.5 Express, latest versions of PHP and MySQL.

I then copied the files from the old server to new server (NOTHING beyond the content of the folders of my websites, so no config files or anything except the web.configs in the sites themselves), set-up websites. I've tried to visit a website, and I got a 503 Service Unavailable message, tried both remotely and locally at the server, no change.

Tried on every site, even on Default Web Site, and no change: still 503.
I've checked the permissions to the folders of the websites (and all the children), and both my account, Network Service, Administrators have effectively full control of all the contents.

All the apps run in DefaultAppPool, which runs under ApplicationPoolIdentity. Tried creating a new app pool, moving sites there, no luck, tried setting "Load User Profile" to False in pool settings (read it here HTTP Error 503 on IIS 7.5 after SP Install), no change.

The event viewer in an extremely detailed way says:

"A process serving application pool 'DefaultAppPool' terminated unexpectedly. The process id was '2356'. The process exit code was '0xfffffffe'."

and nothing else. Five times of this error, and the pool is shut down due to rapid protection. I restart the pool, try again, nothing changes. No matter I'm trying to get an .aspx, .php, or static content. Here is the most weird part: when I set the app pool to run under LocalSystem, it works. No problem. But everything else fails.

I've checked the website folders about ten times, changed, erased, re-added rights etc tried everything but no change. It's as if there is another file that I'm forgetting to check that the pool's user is unable to access. But the event viewer does not help me. This started with the new server and I tried after installing everything, so I can't tell after what this started happening. I obviously won't be running under LocalSystem. Even my own user, Administrator, doesn't work.

The only identity that works is LocalSystem. My user, LocalService, NetworkService, ApplicationPoolIdentity all fail the same way. I'm going crazy, I'm 99% sure this is a user-rights issue. But all the website files are accessible, and I haven't changed anything in the system32 inetconfig or anywhere.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝咒 2024-12-02 09:28:26

好吧,又找到了我自己的答案。
进程 w3wp.exe 在 DefaultAppPool 用户下运行,而不是在 NETWORK SERVICE 下运行。我不知道为什么它不在 NETWORK SERVICE 下运行,但经过一些研究发现该进程需要访问 C:\Windows\System32\inetsrv\config\schema 并提供 NETWORK服务访问没有改变任何东西。我偶然发现了有关 DefaultAppPool 用户的某个地方,并授予了读取权限,通过启动该池,我的所有网站都开始完美运行。很奇怪,我一直以为IIS进程默认在NETWORK SERVICE下运行,并且我确信我没有更改任何设置。

Ok, found my own answer again.
The process w3wp.exe runs under the DefaultAppPool user, not NETWORK SERVICE. I don't know why it doesn't run under NETWORK SERVICE, but after some research it turned out that the process needed access to C:\Windows\System32\inetsrv\config\schema and giving NETWORK SERVICE access didn't change anything. I've by coincidence found somewhere about the DefaultAppPool user, gave read permissions, and by starting the pool, all my websites started working perfectly. Quite weird, I always thought that the IIS processes ran under NETWORK SERVICE by default, and I'm sure that I haven't changed any setting.

一场信仰旅途 2024-12-02 09:28:26

尝试运行以下命令并进行一些更改

appcmd set apppool /apppool.name: <YourAppPoolHavingIssuesHere> /managedRuntieVersion:v<.net Framework version here>

Try running below commands with some changes

appcmd set apppool /apppool.name: <YourAppPoolHavingIssuesHere> /managedRuntieVersion:v<.net Framework version here>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文