Wednesday, December 22, 2010

.NET - Using Cookieless Forms Authentication


Introduction:

Some users don’t allow cookies to be stored in their machines. When we use forms authentication in our asp.netapplications with cookies, this turns out to be a problem.

Description:
To handle the above mentioned problem use “cookieless="UseUri”  name value pair in form authentication.
 Rounded Rectangle: <system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name=".AspxAuth" cokieless="UseUri">
      </forms>
</authentication>
</system.web>

Above code will store the cookie data in the URL.