我們的一位用戶在我們的Web應用程序中出現錯誤。我們不能重複這個問題,我懷疑它是網絡相關的。我讓用戶在他們的辦公室和家中使用他們的筆記本來嘗試應用程序,並確認問題只發生在他們的辦公室。服務器在發送HTTP頭之後無法設置內容類型 - 跟蹤此問題
我登錄到服務器並在他們的辦公室嘗試後查看了事件查看器,並且以下警告出現在日誌中。
我不知道如何開始跟蹤這個問題。有什麼建議麼?
事件查看器日誌如下:
事件代碼:3005事件消息:發生未處理的異常。 事件時間:6/20/2012 6:32:45 PM事件時間(UTC):6/20/2012 10:32:45 PM事件ID:ebf8f628a9b3457cbea117c8c2da2186事件序列:2970 事件發生:26事件詳細信息代碼: 0應用程序信息:
Application domain: /LM/W3SVC/50/ROOT-1-129847041933281152 Trust level: Full Application Virtual Path:/ Application Path: c:\websites\foobar.acme.com\ Machine name: MyServer Process information: Process ID: 15152 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: HttpException Exception message: Server cannot set content type after HTTP headers have been sent. Request information: Request URL: http://foobar.acme.com/Project/Evaluate/ResultsXML.aspx?step=89&uid=4397&rnd=hhf8oe Request path: /Project/Evaluate/ResultsXML.aspx User host address: 192.168.102.1 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\NETWORK SERVICE Thread information: Thread ID: 12 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.HttpResponse.set_ContentType(String value) at System.Web.UI.Page.SetIntrinsics(HttpContext context, Boolean allowAsync) at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.error_aspx.ProcessRequest(HttpContext context) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) Custom event details:
可能重複[之後HTTP標頭已被送往IIS7.5服務器不能設置狀態(HTTP://計算器.com/questions/2383169/server-can-set-status-after-http-headers-have-been-sent-iis7-5) –
[HTTP服務器在發送HTTP頭文件後無法設置內容類型](http :http://stackoverflow.com/questions/901083/server-cannot-set-content-type-after-http-headers-have-been-sent) –
[服務器無法設置HTTP標頭髮送後的內容類型] (http://stackoverflow.com/questions/9360857/server-cannot-set-content-type-after-http-headers-have-been-sent) –