ASP.NET cannot determine in IE10 that the user has logged in and Session has lost the problem resolution

  • 2020-05-24 05:31:24
  • OfStack

Today, I found that when I logged into one of our company's websites in IE10, I clicked on other menus, and the page would automatically exit back to the login page. After checking, I found that the HTTP header sent by IE10 and.AUTH Cookie were all ok, but the form verification mechanism (FormsAuthentication) could not be used to judge whether the user had logged in, and the saved Session would always be lost.

After verify the ASP. NET 2.0, 3.5 and 4.0 Bugs, because of these versions can't identify IE10 User - Agent header string, so I can't identify the user's browser version, which lead to the ASP. NET specific function failure, think the browser does not support Cookies function, does not handle Cookie related code, etc., thus in the browser does not save the server returned Session logo, cause loss, etc.

This problem has been officially confirmed by Microsoft. It is one Bug of IE10, and two HOTFIX have been released to fix this problem. If you encounter the same problem, please refer to the following instructions:
KB2600088: Hotfix for ASP.NET in Microsoft.NET Framework 4.0
KB2608565: Hotfix for ASP.NET in.NET Framework 3.5.1
KB2600100: Hotfix for.NET Framework 3.5 SP1 and.NET Framework 2.0 SP2 ASP.NET [English]
A simple solution is to add a new browser definition file (browser definition file) to the root of the site

The steps are as follows:
1. Add a "App_Browsers" folder
2. Add a file with the suffix "*.browser ", such as IE10.browser.
3. Add file contents as follows:
 
<browsers> 
<browser refID="Default"> 
<capabilities><!-- To avoid wrong detections of e.g. IE10 --> 
<capability name="cookies" value="true" /> 
<capability name="ecmascriptversion" value="3.0" /> 
</capabilities> 
</browser> 
</browsers> 

The setting is completed and the problem can be solved

Related articles: