简体   繁体   English

仅当使用NetworkService时,站点才不会使用ApplicationPoolIdentity在本地启动:“ HTTP错误503。该服务不可用。”

[英]Site wont start on local using ApplicationPoolIdentity, only when using NetworkService: “HTTP Error 503. The service is unavailable.”

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. 我开始这个问题是希望能得到社区的帮助,但是在充分解释和详细说明我的问题的过程中,似乎已经设法解决了这一问题,这似乎是一种合法的非骇客的方式(请告诉我如果我错了),那么我将其保留在这里,希望对其他人有所帮助。

QUESTION

I'm in the process of upgrading my Visual Studio 2010 .NET 4 MVC4 site to Visual Studio 2013 .NET 4.5 MVC5. 我正在将我的Visual Studio 2010 .NET 4 MVC4站点升级到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. 使用Visual Studio IIS时,该站点运行良好,但是当我将其切换到Windows IIS并将用户设置为ApplicationPoolIdentity并启动该站点时,我得到的页面显示为“ HTTP错误503。该服务不可用。”,并且ApplicationPool停止。

I've found a couple of questions asking the same thing on StackOverflow but none of them have an acceptable solution. 我在StackOverflow上发现了几个同样的问题,但是没有一个可以接受的解决方案。 One answer was to right click the AppPool > AdvancedSettings > LoadUserProfile = FALSE. 一种答案是右键单击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. 这确实有效,我花了一段时间,但我发现它导致PhantomJS加载外部脚本时出现问题。 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. 我通过将AppPoolUser设置为NetworkService并将LoadUserProfile设置为FALSE(仍然破坏了PhantomJS)进行了测试,然后将LoadUserProfile设置为TRUE,并且可以正常工作。

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. 因此,我正在使用NetworkService运行站点,目前这一切都很好,但是我希望在完成升级之前能够使用ApplicationPoolIdentity,以便可以在生产环境中使用ApplicationPoolIdentity。

I've checked out EventViewer and I get a lot of warnings telling me that files can't be copied from 我检查了EventViewer,并收到很多警告,告诉我无法从中复制文件

\\?\C:\Users\Default\AppData\Roaming\Microsoft\Templates\LiveContent\Managed\SmartArt 

to

 \\?\C:\Users\TEMP.IIS APPPOOL.004\AppData\Roaming\Microsoft\Templates\LiveContent\Managed\SmartArt Graphics\1033\TC101793893[[fn=Tabbed Arc]].glox.

I created a folder called APPPOOL.004, it then complained about APPPOOL.005, then APPPOOL.006, and it just kept going. 我创建了一个名为APPPOOL.004的文件夹,然后抱怨APPPOOL.005,然后抱怨APPPOOL.006,它一直在运行。

SOLUTION

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. 然后,我向ApplicationPoolIdentity授予了C:\\ Users文件夹的完全权限,再次启动了站点,并且一切正常,必须正确创建了配置文件,并且我的站点可以正常工作。 I then removed access to C:\\Users from ApplicationPoolIdentity and the site still works as it should. 然后,我从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. 我向ApplicationPoolIdentity授予了C:\\ Users文件夹的完全权限,启动了站点,并且一切正常,必须正确创建了配置文件,并且我的站点可以正常工作。 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临时完全访问C:\\ Users的问题引起了其他安全问题

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

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