簡體   English   中英

IIS Express Worker在運行測試時已停止工作

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

我有針對已啟動的IIS Express服務器運行的集成測試。 在我其他團隊成員的計算機上,這些測試運行良好。 但是,在我的計算機上,IIS Express在測試運行過程中崩潰,從而導致之后的所有測試失敗。

  1. 我正在運行我知道會在其他所有人的機器上通過的測試,包括我們的構建服務器
  2. 不選擇不使用IIS Express,因為這樣我的構建環境將與團隊的不一致。 此外,這些測試在一周前運行得還不錯,所以這應該不是問題。
  3. 我已經卸載並重新安裝了Visual Studio 2013.5,但無濟於事。
  4. 我已經卸載了IIS 10 Express,並沒有安裝IIS 8.0 Express。 (我找不到IIS 10 Express的任何下載/安裝程序,但這絕對是以前安裝在計算機上的內容。)
  5. 我已經完全卸載了Visual Studio 2015,以防與2013安裝沖突。 另外,也無濟於事。
  6. 我們所有的機器都是相同的版本,所以我知道這不是硬件問題。
  7. 我的機器正在運行Windows 8.1 x64。 該項目是運行.NET 4.5.1的混合ASPX / MVC Web項目

我很快就精疲力盡了,沒有重新格式化硬盤並擦掉行星表面上的所有東西的方法-這似乎很極端,但是如果那是我唯一的選擇,那就這樣吧。

更新資料

這是事件查看器中顯示的錯誤:

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)

應用程序錯誤,上午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

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運行時,上午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:

應用程序錯誤,上午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: 

更新2

捕獲優先機會異常並附加到IIS Express進程時,出現以下異常:

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

Additional information: Thread was being aborted.

嘗試調用context.Response.Redirect("~/ErrorPages/AccessDenied.aspx", true);時會發生這種情況context.Response.Redirect("~/ErrorPages/AccessDenied.aspx", true); 重定向到該頁面的其他頁面可以成功執行此操作。

更新3

這是關閉“ Just My Code”時的首選機會

第一

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

第二

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: 

第三

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: 

第四

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: 

第五(這發生在車禍之前):

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

希望其中一些幫助。

事實證明,這個對其他問題的回答解決了我的問題: https : //stackoverflow.com/a/24880514/2689694

簡而言之,因為我已經安裝了Visual Studio 2015,所以我的IIS配置已被修改為使用其他管道模式。 在我們的代碼中,這些重定向往往作為重載傳遞給true ,這意味着響應將結束-這將引發線程異常中止。 解決的方法是(如鏈接所討論的)使用Context.ApplicationInstance.CompleteRequest()而不是重載布爾值。 這意味着它現在將獨立於管道模式正常運行。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM