简体   繁体   English

在将IIS“嵌套”应用程序部署到主网站后,第二个ASP.NET Web应用程序挂起

[英]a second ASP.NET web app hangs after deployed as IIS 'nested' Application onto primary web site

My IIS nested application hangs when I browse from IIS -- browser's busy spinner just spins forever. 当我从IIS浏览时,我的IIS嵌套应用程序挂起-浏览器繁忙的微调器将永远旋转。

I added a 2nd VS ASP.NET web app project to my primary web site, as a IIS 'nested' application. 我将第二个VS ASP.NET Web应用程序项目添加到我的主网站中,作为IIS“嵌套”应用程序。

The 2nd web app project debugs from VS OK and opens browser to it. 第二个Web应用程序项目从VS OK调试,并打开浏览器。

Is it possible to break in with debugger to see if code is in a loop or something? 是否有可能闯入调试器以查看代码是否在循环中?

BACKGROUND: 背景:
IIS 6.5 on my Windows Server 2012 R2 Azure VM 我的Windows Server 2012 R2 Azure VM上的IIS 6.5
VS is 15.3.4 VS是15.3.4

IIS > Sites > my primary web site > TEST (this Application added to primary) > Advanced Settings: IIS>站点>我的主要网站>测试(此应用程序已添加到主要)中>高级设置:
在此处输入图片说明
App Pool = DefaultAppPool 应用程序池= DefaultAppPool
Physical Path = path to TEST's VS project 物理路径= TEST VS项目的路径
Virtual Path = /TEST 虚拟路径= / TEST

IIS 6.5... IIS 6.5 ... 在此处输入图片说明

在此处输入图片说明

Test Settings... 测试设置...

If you aren't sure what issue is causing your website to spin forever, look at the live requests within IIS. 如果不确定是什么问题导致您的网站永远旋转,请查看IIS中的实时请求。 From the IIS Management Console select Worker Processes. 在IIS管理控制台中,选择“工作进程”。

在此处输入图片说明

Right click on your running application pool and select “View Current Requests”. 右键单击正在运行的应用程序池,然后选择“查看当前请求”。

在此处输入图片说明

This will bring up a list of the currently running ASP.NET web requests as shown below. 这将显示当前正在运行的ASP.NET Web请求的列表,如下所示。

在此处输入图片说明

I would suggest looking at the “Time Elapsed” to see if you have a lot of requests that are taking a very long time. 我建议您查看“经过的时间”,看看是否有很多请求需要很长时间。 You should also see if they are all stuck in the same module. 您还应该查看它们是否全部卡在同一模块中。 This could be a clue that the issue is all related to ASP.NET Sessions or some other step within the ASP.NET request life cycle. 这可能是问题完全与ASP.NET会话或ASP.NET请求生命周期内的其他步骤有关的线索。 You may also be able to identify a specific URL that is causing the problem. 您也许还可以识别导致问题的特定URL。

Also in addition to that , I would highly suggest using a logging framework like NLog, log4net or Serilog. 除此之外,我强烈建议使用日志记录框架,例如NLog,log4net或Serilog。 You can then send them to a log management service to make it easier to search them across multiple servers. 然后,您可以将它们发送到日志管理服务,以便更轻松地在多个服务器中搜索它们。 Application logs are good way to trace your application trace across server. 应用程序日志是跨服务器跟踪应用程序跟踪的好方法。

If your web request is returning a 500 Internal Server Error, you need to check your server-side logs for exceptions. 如果您的Web请求返回500 Internal Server Error,则需要检查服务器端日志中是否存在异常。 As mentioned above about application logs in general, it is important to have good exception handling in place and properly logging all of your errors. 正如上面提到的有关应用程序日志的一般性内容,重要的是要有适当的异常处理并正确记录所有错误。

Also you could use some open source diagnostic tool like Glimpse to trace. 您也可以使用某些开源诊断工具(如Glimpse)进行跟踪。 Glimpse is a thriving and growing family of open source NuGet packages that provides detailed performance, debugging and diagnostic information for ASP.NET apps. Glimpse是一个蓬勃发展的开源NuGet软件包家族,可为ASP.NET应用提供详细的性能,调试和诊断信息。 It's trivial to install, lightweight, ultra-fast, and displays key performance metrics at the bottom of every page. 它非常容易安装,轻巧,超快,并在每页底部显示关键性能指标。 It allows you to drill down into your app when you need to find out what's going on at the server. 当您需要了解服务器上正在发生的事情时,它可以让您深入研究您的应用程序。 Glimpse provides so much valuable information we recommend you use it throughout your development cycle, including your Azure test environment. Glimpse提供了很多有价值的信息,我们建议您在整个开发周期(包括Azure测试环境)中使用它。 While Fiddler and the F-12 development tools provide a client side view, Glimpse provides a detailed view from the server. Fiddler和F-12开发工具提供了客户端视图,而Glimpse提供了服务器的详细视图。 You can try using that too. 您也可以尝试使用它。

Hope it helps. 希望能帮助到你。

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

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