Asp. NET in IE10 can not judge the user has logged in and session loss problem solving method _ practical skills

Source: Internet
Author: User
Tags session id
Today found in the IE10 in my company's one site, click on other menus, the page will automatically withdraw to the login page, after the check found that IE10 sent out the HTTP headers, and. AUTH cookies are fine, but use the form authentication mechanism (formsauthentication) It is not possible to tell if the user is logged in and the saved session will always be lost.

After verification that this is ASP.net 2.0,3.5 and 4.0 of the bugs, because these versions do not recognize the IE10 user-agent header string, so the user browser version is not recognized, which leads to the ASP.net specific function failure, Think that the browser does not support cookies, do not handle cookies-related code, etc., so that the server does not save the return of the session ID, resulting in loss.

This issue has been officially confirmed by Microsoft, is a IE10 bug, also released two hotfix dedicated to fix this problem, if you encounter the same problem, you can refer to the following instructions:
Kb2600088:hotfix applicable in the Microsoft.NET Framework 4.0 asp.net [English]
Kb2608565:hotfix applies to ASP.net in the. NET Framework 3.5.1 [English]
Kb2600100:hotfix applies to SP2 in the. NET Framework 3.5 SP1 and the. NET Framework 2.0 asp.net [English]
The simple solution is to add a browser definition file (browser definition files) to the site root directory

steps are as follows:
1. Add a "App_Browsers" folder
2. Add a "*.browser" suffix of the file, such as Ie10.browser.
3. The contents of the added file are as follows:
Copy Code code 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 complete, the problem can be solved
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.