站点不会使用 ApplicationPoolIdentity 在本地启动,只有在使用 NetworkService 时才会启动:“HTTP 错误 503.该服务不可用". [英] Site wont start on local using ApplicationPoolIdentity, only when using NetworkService: "HTTP Error 503. The service is unavailable."

查看:33
本文介绍了站点不会使用 ApplicationPoolIdentity 在本地启动,只有在使用 NetworkService 时才会启动:“HTTP 错误 503.该服务不可用".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出这个问题是希望能从社区得到一些帮助,但在充分解释和详细说明我的问题的过程中,我似乎已经设法以一种合法的非黑客方式解决了它(如果我错了,请告诉我),所以我会把它保留在这里,希望它能帮助别人.

I started this question in the hopes of getting some help from the community, but in the process of fully explaining and detailing my problem it seems I've managed to solve it, in what seems to be a legit non hackish way (please tell me if I'm wrong), so I'm going to keep it here in the hopes that it will help others.

问题

我正在将我的 Visual Studio 2010 .NET 4 MVC4 站点升级到 Visual Studio 2013 .NET 4.5 MVC5.该站点在使用 Visual Studio IIS 时运行良好,但是当我将其切换到 Windows IIS 并将用户设置为 ApplicationPoolIdentity 并启动该站点时,我收到一个页面,显示HTTP 错误 503.该服务不可用.",并且应用程序池停止.

I'm in the process of upgrading my Visual Studio 2010 .NET 4 MVC4 site to Visual Studio 2013 .NET 4.5 MVC5. The site runs fine when using the Visual Studio IIS, but when I switch it over to Windows IIS and set the user to ApplicationPoolIdentity and start the site, I get a page saying "HTTP Error 503. The service is unavailable.", and the ApplicationPool gets stopped.

我在 StackOverflow 上发现了几个问同样问题的问题,但没有一个有可接受的解决方案.一种答案是右键单击 AppPool > AdvancedSettings > LoadUserProfile = FALSE.这确实有效,我使用了一段时间,但我刚刚发现它导致 PhantomJS 加载外部脚本出现问题.我通过将 AppPoolUser 设置为 NetworkService 并将 LoadUserProfile 设置为 FALSE 来测试这个,这仍然破坏了 PhantomJS,然后我将 LoadUserProfile 设置为 TRUE 并且它工作了.

I've found a couple of questions asking the same thing on StackOverflow but none of them have an acceptable solution. One answer was to right click the AppPool > AdvancedSettings > LoadUserProfile = FALSE. This does work and I went with it for a while but I've just found it caused a problem with PhantomJS loading external scripts. I tested this by setting the AppPoolUser to NetworkService and setting LoadUserProfile to FALSE which still broke PhantomJS, and then I set LoadUserProfile to TRUE and it worked.

所以我正在使用 NetworkService 运行该站点,现在一切都很好,但我希望在我完成此升级时能够使用 ApplicationPoolIdentity,以便我可以在生产中使用 ApplicationPoolIdentity.

So I'm running the site using NetworkService and that's all good for now, but I want to be able to use ApplicationPoolIdentity by the time I finish this upgrade so that I can use ApplicationPoolIdentity on the production.

我已经检查了 EventViewer,但收到很多警告,告诉我无法从

I've checked out EventViewer and I get a lot of warnings telling me that files can't be copied from

\?C:UsersDefaultAppDataRoamingMicrosoftTemplatesLiveContentManagedSmartArt 

 \?C:UsersTEMP.IIS APPPOOL.004AppDataRoamingMicrosoftTemplatesLiveContentManagedSmartArt Graphics1033TC101793893[[fn=Tabbed Arc]].glox.

我创建了一个名为 APPPOOL.004 的文件夹,然后它抱怨 APPPOOL.005,然后是 APPPOOL.006,它一直在运行.

I created a folder called APPPOOL.004, it then complained about APPPOOL.005, then APPPOOL.006, and it just kept going.

解决方案

然后我授予 ApplicationPoolIdentity 对 C:Users 文件夹的完全权限,再次启动该站点,一切正常,配置文件必须已正确创建,并且我的站点正常工作.然后,我从 ApplicationPoolIdentity 中删除了对 C:Users 的访问权限,该站点仍然可以正常工作.

I then gave ApplicationPoolIdentity full permissions to the C:Users folder, started the site again and everything worked, the profile must have been created properly, and my site works as it should. I then removed access to C:Users from ApplicationPoolIdentity and the site still works as it should.

推荐答案

我给了 ApplicationPoolIdentity 对 C:Users 文件夹的完全权限,启动了站点并且一切正常,配置文件必须已正确创建,并且我的站点正常工作这应该.然后,我从 ApplicationPoolIdentity 中删除了对 C:Users 的访问权限,该站点仍然可以正常工作.

I gave ApplicationPoolIdentity full permissions to the C:Users folder, started the site and everything worked, the profile must have been created properly, and my site works as it should. I then removed access to C:Users from ApplicationPoolIdentity and the site still works as it should.

请告诉我在授予 ApplicationPoolIdentity 对 C:Users 的临时完全访问权限时是否可能造成任何额外的安全问题

Please tell me if I may have caused any extra security issues in giving ApplicationPoolIdentity temporary full access to C:Users

这篇关于站点不会使用 ApplicationPoolIdentity 在本地启动,只有在使用 NetworkService 时才会启动:“HTTP 错误 503.该服务不可用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆