I have setup simple form authentication with Logon and Logout pages as follows:
Web.config:
<authentication mode="Forms">
<forms loginUrl="Logon.aspx" name=".MyCookieName">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
<sessionState mode="InProc" cookieless="false" timeout="20" />
Logon.aspx:
TimeSpan timeout =
TimeSpan.Parse("1");
DateTime cookieCreationTime = DateTime.Now;
...
Go to the complete details ...