简体   繁体   English

IIS Express Worker在运行测试时已停止工作

[英]IIS Express Worker has stopped working when running tests

I have integration tests that are running against a spun-up IIS Express server. 我有针对已启动的IIS Express服务器运行的集成测试。 On my other team member's machines, these tests run fine. 在我其他团队成员的计算机上,这些测试运行良好。 However, on my machine, IIS Express crashes midway through the test run, causing all tests afterwards to fail. 但是,在我的计算机上,IIS Express在测试运行过程中崩溃,从而导致之后的所有测试失败。

  1. I am running tests that I know pass on everyone else's machine, including our build server 我正在运行我知道会在其他所有人的机器上通过的测试,包括我们的构建服务器
  2. Not using IIS Express is not an option, as then my build environment would be inconsistent with the team's. 不选择不使用IIS Express,因为这样我的构建环境将与团队的不一致。 Furthermore, these tests were running just fine not a week ago, so this shouldn't be a problem. 此外,这些测试在一周前运行得还不错,所以这应该不是问题。
  3. I have uninstalled and reinstalled Visual Studio 2013.5 to no avail. 我已经卸载并重新安装了Visual Studio 2013.5,但无济于事。
  4. I have uninstalled IIS 10 Express and installed IIS 8.0 Express to no avail. 我已经卸载了IIS 10 Express,并没有安装IIS 8.0 Express。 (I couldn't find any download/installer for IIS 10 Express, but that was definitely what was installed on the machine before.) (我找不到IIS 10 Express的任何下载/安装程序,但这绝对是以前安装在计算机上的内容。)
  5. I have uninstalled Visual Studio 2015 entirely, in case it was causing conflicts with the 2013 install. 我已经完全卸载了Visual Studio 2015,以防与2013安装冲突。 Also, no avail. 另外,也无济于事。
  6. All of our machines are identical builds, so I know this isn't a hardware problem. 我们所有的机器都是相同的版本,所以我知道这不是硬件问题。
  7. My machine is running Windows 8.1 x64. 我的机器正在运行Windows 8.1 x64。 The project is a mixed ASPX/MVC web project running .NET 4.5.1 该项目是运行.NET 4.5.1的混合ASPX / MVC Web项目

I am quickly running out of ideas short of reformatting my hard drive and wiping everything off of the face of the planet - which seems extreme, but if that's my only option, then so be it. 我很快就精疲力尽了,没有重新格式化硬盘并擦掉行星表面上的所有东西的方法-这似乎很极端,但是如果那是我唯一的选择,那就这样吧。

Update 更新资料

Here are the errors as shown in the event viewer: 这是事件查看器中显示的错误:

ASP.NET 4.0.30319.0, 11:36:44 AM ASP.NET 4.0.30319.0,11:36:44 AM

An unhandled exception occurred and the process was terminated.

Application ID: /LM/W3SVC/1/ROOT

Process ID: 6072

Exception: System.Threading.ThreadAbortException

Message: Thread was being aborted.

StackTrace:    at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Application Error, 11:36:44 AM 应用程序错误,上午11:36:44

Faulting application name: iisexpress.exe, version: 8.5.9748.0, time stamp: 0x5384d451
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17278, time stamp: 0x53eeb460
Exception code: 0xe0434352
Fault offset: 0x00012f71
Faulting process id: 0x17b8
Faulting application start time: 0x01d0d90283199962
Faulting application path: C:\Program Files (x86)\IIS Express\iisexpress.exe
Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
Report Id: c3187027-44f5-11e5-82a2-a0481c829032
Faulting package full name: 
Faulting package-relative application ID: 

ASP.NET 4.0.30319.0, 11:36:48 AM ASP.NET 4.0.30319.0,11:36:48 AM

An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 6072

Exception: System.Threading.ThreadAbortException

Message: Thread was being aborted.

StackTrace: 

.NET Runtime, 11:36:48 AM .NET运行时,上午11:36:48

Application: iisexpress.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Threading.ThreadAbortException
Stack:

Application Error, 11:36:48 AM 应用程序错误,上午11:36:48

Faulting application name: iisexpress.exe, version: 8.5.9748.0, time stamp: 0x5384d451
Faulting module name: KERNELBASE.dll, version: 6.3.9600.17278, time stamp: 0x53eeb460
Exception code: 0xe0434352
Fault offset: 0x00012f71
Faulting process id: 0x17b8
Faulting application start time: 0x01d0d90283199962
Faulting application path: C:\Program Files (x86)\IIS Express\iisexpress.exe
Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
Report Id: c5aab60e-44f5-11e5-82a2-a0481c829032
Faulting package full name: 
Faulting package-relative application ID: 

Update 2 更新2

When catching first-chance exceptions and attaching to the IIS Express process, I get the following exception: 捕获优先机会异常并附加到IIS Express进程时,出现以下异常:

A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll

Additional information: Thread was being aborted.

This occurs when trying to call context.Response.Redirect("~/ErrorPages/AccessDenied.aspx", true); 尝试调用context.Response.Redirect("~/ErrorPages/AccessDenied.aspx", true);时会发生这种情况context.Response.Redirect("~/ErrorPages/AccessDenied.aspx", true); Other pages that redirect to this page can do so successfully. 重定向到该页面的其他页面可以成功执行此操作。

Update 3 更新3

Here are the first-chance exceptions when turning off "Just My Code" 这是关闭“ Just My Code”时的首选机会

First 第一

System.Globalization.CultureNotFoundException occurred
Message: A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll
Additional information: Culture is not supported.

Second 第二

System.Web.HttpException occurred
  _HResult=-2147024809
  _message=Invalid file name for file monitoring: 'D:\Dev\Git\Qualtrax\Web\Content'. Common reasons for failure include:
- The filename is not a valid Win32 file name.
- The filename is not an absolute path.
- The filename contains wildcard characters.
- The file specified is a directory.
- Access denied.
  HResult=-2147024809
  IsTransient=false
  Message=Invalid file name for file monitoring: 'D:\Dev\Git\Qualtrax\Web\Content'. Common reasons for failure include:
- The filename is not a valid Win32 file name.
- The filename is not an absolute path.
- The filename contains wildcard characters.
- The file specified is a directory.
- Access denied.
  Source=System.Web
  ErrorCode=-2147024809
  WebEventCode=0
  StackTrace:
       at System.Web.DirectoryMonitor.AddFileMonitor(String file)
  InnerException: 

Third 第三

System.Net.Sockets.SocketException occurred
  _HResult=-2147467259
  _message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
  HResult=-2147467259
  IsTransient=false
  Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
  Source=System
  ErrorCode=10060
  NativeErrorCode=10060
  StackTrace:
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
  InnerException: 

Fourth 第四

System.IO.IOException occurred
  _HResult=-2146232800
  _message=Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
  HResult=-2146232800
  IsTransient=false
  Message=Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
  Source=System
  StackTrace:
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
  InnerException: System.Net.Sockets.SocketException
       _HResult=-2147467259
       _message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
       HResult=-2147467259
       IsTransient=false
       Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
       Source=System
       ErrorCode=10060
       NativeErrorCode=10060
       StackTrace:
            at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
            at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       InnerException: 

Fifth (this one occurrs just before the crash): 第五(这发生在车祸之前):

System.Threading.ThreadAbortException occurred
  _HResult=-2146233040
  _message=Thread was being aborted.

Hope some of those help. 希望其中一些帮助。

As it turns out, this answer to this other question solved my problem: https://stackoverflow.com/a/24880514/2689694 事实证明,这个对其他问题的回答解决了我的问题: https : //stackoverflow.com/a/24880514/2689694

In short, because I had installed Visual Studio 2015, my IIS configuration had been modified to use a different pipeline mode. 简而言之,因为我已经安装了Visual Studio 2015,所以我的IIS配置已被修改为使用其他管道模式。 Those redirects in our code tended to pass in true as an overload, meaning that the response would end - which throws a thread aborted exception. 在我们的代码中,这些重定向往往作为重载传递给true ,这意味着响应将结束-这将引发线程异常中止。 The fix was that (as the link discusses) to use Context.ApplicationInstance.CompleteRequest() instead of the overload boolean. 解决的方法是(如链接所讨论的)使用Context.ApplicationInstance.CompleteRequest()而不是重载布尔值。 That means that it will now behave properly independent of the pipeline mode. 这意味着它现在将独立于管道模式正常运行。

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

相关问题 HTTPS停止使用IIS Express - HTTPS stopped working with IIS express IIS停止工作 - IIS stopped Working 当网站停止时,Oracle数据提供程序会挂起IIS工作进程 - Oracle data provider pegs IIS worker process when web site is stopped 在 Visual Studio 上通过 IIS Express 运行时可以加载图像,但通过 IIS 运行时无法加载 - Image can load when running by IIS Express on Visual studio, but can't load when running by IIS 网站重建,IIS停止工作 - Site rebuilt and IIS stopped working 在ASP.NET 5 / MVC 6上运行Selenium测试之前启动IIS Express - Starting IIS Express before running Selenium tests on ASP.NET 5 / MVC 6 SignalR在本地IIS上不起作用,但在IIS Express上起作用 - SignalR not working on local IIS but working with IIS Express MVC 身份验证在 IIS 中不起作用(在 IIS Express 中起作用) - MVC Authentication not working in IIS (works in IIS Express) MVC 5 身份验证在 IIS Express 中工作但不在 IIS 中 - MVC 5 Authentication working in IIS Express but not in IIS 使用表达式语法(&lt;%$%&gt;)时,ASP.NET本地化在IIS Express中工作,但在IIS7.5中不工作 - ASP.NET Localization working in IIS Express but not in IIS7.5 when using expression syntax (<%$ %>)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM