Author: ASilverblatt | Posted on: 7/7/2009 2:20:41 PM | Views : 531

In a new C# web app (VS 2005), I can't seem to get Response.Redirect to function correctly.  I'm using the following code in my Web.config file to prevent direct user access to any page other than the login page:
<authentication mode="Forms">
     <forms name="logincookie" loginUrl="Default.aspx" protection="All" timeout="30"></forms>
</authentication>
<authorization>
     <deny users="?" />
</authorization>
Once I've authenticated the user on the login page, I want to always send them to a page that is determined on the fly based on the user's credentials, and not necessarily the page they originally requested.

I can't use FormsAuthentication.RedirectFromLoginPage, because that defeats my purpose by always re-directing them to the page they originally requested.

...

Go to the complete details ...