ASP.NET 4.5页面和偶尔的err_ssl_protocol_error

时间:2014-04-23 21:08:46

标签: asp.net ssl iis-8

WinServer 2012 IIS 8 ASP.NET 4.5

我注意到,在使用IE11时,某个特定页面间歇性地无法加载。它只是说“此页面无法显示”。如果我使用F12开发工具,网络跟踪会显示200响应的请求,但响应主体突然在页面中间结束。

当我在Chrome中加载页面时,我间歇地遇到同一页面的问题。但是Chrome会针对该请求显示net::err_ssl_protocol_error。 Chrome还将字节数显示为页面内容的1/2左右。

我在Web服务器上运行了SSLDiag工具,并将所有SSL证书报告为良好/无错误。

每个其他页面(我可以告诉)都可以在网站上运行。其他页面是ASP.NET和MVC的混合,其他页面都没有这个问题。

连接到此是事件查看器中的条目(如下所示)。你会注意到它以显式刷新结束。我没有调用Flush的代码,但我确实关闭了缓冲,因此它必须是内部ASP.NET刷新。但是如何刷新(另一端没有客户端)会导致Chrome报告SSL协议错误?

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 4/23/2014 12:27:31 PM 
Event time (UTC): 4/23/2014 7:27:31 PM 
Event ID: fca4a66e73bf46adb3215dcdb88a0b82 
Event sequence: 1159 
Event occurrence: 19 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/10/ROOT-1-130427523426870110 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: D:\inetpub\wwwroot\MySite\ 
    Machine name: EBIDEVW4 

Process information: 
    Process ID: 5028 
    Process name: w3wp.exe 
    Account name: MyCompany\MySiteUser

Exception information: 
    Exception type: HttpException 
    Exception message: The remote host closed the connection. The error code is 0x800704CD.
   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
   at System.Web.HttpWriter.Write(String s)
   at System.Web.UI.HtmlTextWriter.RenderBeginTag(HtmlTextWriterTag tagKey)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at ASP.rpt_jobs_aspx.__RenderForm1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at ASP.rpt_jobs_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Request information: 
    Request URL: https://customdomain.mycompany.com:443/rpt/jobs.aspx 
    Request path: /rpt/jobs.aspx 
    User host address: 10.10.1.25 
    User: myuser 
    Is authenticated: True 
    Authentication Type: Forms 
    Thread account name: MyCompany\MySiteUser 

Thread information: 
    Thread ID: 10 
    Thread account name: MyCompany\MySiteUser
    Is impersonating: False 
    Stack trace:    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
   at System.Web.HttpWriter.Write(String s)
   at System.Web.UI.HtmlTextWriter.RenderBeginTag(HtmlTextWriterTag tagKey)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.WebControls.Table.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at ASP.rpt_jobs_aspx.__RenderForm1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
   at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at ASP.rpt_jobs_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)
   at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
   at System.Web.UI.Page.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

更新:如果用户真正关闭中间连接,我不太关心在服务器上获取The remote host closed the connection. The error code is 0x800704CD.异常。我的担忧和问题是,为什么在chrome和IE中有一个ssl协议错误,而Chrome和IE中的响应似乎没有任何东西停止请求?

1 个答案:

答案 0 :(得分:0)

这也发生在我们的一些网站上。我注意到他们中的大多数都是爬虫。

当爬网程序请求页面并关闭连接而不等待服务器的响应或在发送请求的过程中关闭连接时抛出异常。

同样,当用户请求页面并关闭浏览器或网络连接时也会发生这种情况。

据我所知,关于The remote host closed the connection例外你无能为力。

如果您愿意,您可能希望忽略void Application_Error(object sender, EventArgs e)中的那种错误。