ASP.NET - How can I manually create a authentication cookie instead of the default method?
<p>In form authentication logic we write code like</p>

<pre><code> if (IsValidUser())
 {
      FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
      FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie); 
 }
</code></pre>

<ol>
<li><p>I just need to know how can i manually create a authentication cookie instead of the below line <code>FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);</code></p></li>
<li><p>how to store the redirect from login page url in string variable instead of the below line <code>FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie);</code>
is it possibe to have the above information writing code.......please guide.</p></li>
</ol>
