Don't believe in Asp.net4 request.browser.cookies,form verification to use UseCookies

Source: Internet
Author: User

After upgrading from ASP. 3.5 to Asp.net4, there are three types of cookies that cannot be saved after logging in (all normal before the upgrade):

1. Swim 3 in Speed mode (default mode).

2. UserAgent has been modified in Firefox.

3. Nokia phone comes with a browser or UCWeb browser to visit the blog Park Mobile version (m.cnblogs.com).

Today finally the culprit to find out, it is Request.Browser.Cookies.

If you use form validation in your program and use a cookie to save the user's login status, keep in mind that you should add cookieless= to <authentication mode= "Forms" >/<forms> " UseCookies ". If this is not set, cookieless will use the default value of UseDeviceProfile. With the UseDeviceProfile, the tragedy happened, ASP. NET will determine whether the current browser supports cookies based on Request.Browser.Cookies

Original: http://www.cnblogs.com/dudu/archive/2011/03/06/asp_net_4_browser_cookie.html

Don't believe in Asp.net4 request.browser.cookies,form verification to use UseCookies

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.