AutoDetect setting of the cookieless attribute to enable - ASP.NET Security

Q.  If any user has disabled cookies in their browsers, what can you do to enable them to use forms authentication?
- Published on 27 Jul 15

a. Set BoweserCookieEnabled=true;
b. Set cookieless=true;
c. Use the AutoDetect setting of the cookieless attribute.
d. None of the above.

ANSWER: Use the AutoDetect setting of the cookieless attribute.
 

    Discussion

  • Raj Singh   -Posted on 21 Sep 15
    If any user has disabled cookies in their browsers, then you need to set the cookieless attribute to the value AutoDetect. Cookieless authentication enables you to use Forms Authentication to authenticate users even any when user has disabled cookies in their browsers. A user can be identified by a unique token added to a page’s URL, if cookieless authentication is enabled. When a user navigates from one page to another then the token is passed from page to page automatically and the user can be identified across multiple page requests.
    The code written in web.cofig file enables AutoDetect.
    < configuration>
    < system.web>
    < authentication mode=”Forms”>
    < forms cookieless=”AutoDetect”/>
    < /authentication>
    < /system.web>
    < /configuration>

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)