简体   繁体   English

网站无法在Visual Studio中运行,会停止应用程序池

[英]Web site won't run in Visual Studio, stops application pool

When I try to start my web site in Visual Studio, it gives me an error message and stops the IIS application pool that it was supposed to use. 当我尝试在Visual Studio中启动网站时,它给我一条错误消息,并停止它应该使用的IIS应用程序池。 I am using Visual Studio Professional 2013 and ASP.NET MVC with IIS as the server, all running on the same computer under Windows 7 Ultimate. 我正在使用Visual Studio Professional 2013和IIS作为服务器的ASP.NET MVC,它们都在Windows 7 Ultimate下在同一台计算机上运行。 I can reproduce the following steps. 我可以重现以下步骤。

  1. Check to ensure that the app pool is running. 检查以确保应用程序池正在运行。
  2. Press F5 to start debugging. 按F5开始调试。 VS gives me an error message that says, "Unable to start debugging on the web server. Could not start ASP.NET debugging. More information may be available by starting the project without debugging." VS给了我一条错误消息,内容为:“无法在Web服务器上启动调试。无法启动ASP.NET调试。可以通过不调试而启动项目来获得更多信息。”
  3. Check the application pool again. 再次检查应用程序池。 It is stopped. 停止了。
  4. Restart the app pool. 重新启动应用程序池。
  5. Press Ctrl-F5 to start the app without debugging. 按Ctrl-F5即可启动应用程序而无需调试。
  6. My debugging browser displays a screen that says, "Service Unavailable HTTP Error 503. The service is unavailable." 我的调试浏览器显示一个屏幕,显示“服务不可用HTTP错误503。服务不可用”。
  7. Check the app pool in IIS Manager. 在IIS管理器中检查应用程序池。 It is stopped again. 再次停止。

The project was running fine recently. 该项目最近运行良好。

I have tried the following: 我尝试了以下方法:

  • Restart Windows. 重新启动Windows。
  • Verify that the web app I want to run is the startup project. 确认我要运行的Web应用程序是启动项目。
  • Verify that "Define DEBUG constant" is checked in the Properties page of the project. 验证是否在项目的“属性”页面中选中了“定义调试常量”。
  • Verify that debugging is set in the Web.Config. 验证是否在Web.Config中设置了调试。 file, as follows: 文件,如下:

    <compilation debug="true" targetFramework="4.5" />


Edit: 编辑:

I checked logs as suggested (Thank you Kenneth!). 我按照建议检查了日志(谢谢肯尼思!)。

The System log has a series of four "Warning" messages with a source of "WAS". 系统日志包含一系列四个“警告”消息,消息来源为“ WAS”。 They say, "The Windows Process Activation Service failed to create a worker process for the applicatino pool 'SMS Web'. The data field contains the error number. 他们说:“ Windows进程激活服务无法为applicatino池'SMS Web'创建工作进程。数据字段包含错误号。

An error message then appears, also with a source of "WAS" that says, "Application pool 'SMS Web' is being automatically disabled due to a series of failures in the process(es) serving that application pool." 然后出现一条错误消息,也带有“ WAS”源,该消息指出“由于为该应用程序池提供服务的过程中发生了一系列故障,因此自动禁用了应用程序池'SMS Web'”。

Finally, these messages were followed immediately by a (possibly unrelated) "Information" message with a source of "Service Control Manager" that says, "The Multimedia Class Scheduler service entered the running state." 最后,在这些消息之后紧接着是(可能不相关的)“信息”消息,其消息来源为“服务控制管理器”,内容为“多媒体类调度程序服务进入运行状态”。

I had a similar problem with a similar solution: 我在类似的解决方案中遇到了类似的问题:

Scenario: I had the app pool running under an user account and it's password had been changed because it had expired. 场景:我使应用程序池在一个用户帐户下运行,并且密码已更改,因为它已过期。 I never updated IIS so the app pool would stop by itself. 我从未更新过IIS,因此应用程序池会自行停止。

Solution: update the credentials for the account on IIS or use another account 解决方案:在IIS上更新该帐户的凭据或使用其他帐户

Just posting this in case it helps anyone 只是发布此内容以防任何人

If you have configured a username and password in the application pool, then if you have changed the password for that account, you may get this error. 如果您已在应用程序池中配置了用户名和密码,则如果您更改了该帐户的密码,则可能会收到此错误。

If you changed the password, you'll have to change it there also. 如果您更改了密码,则还必须在此进行更改。

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

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