troubleshooting Question

Form Authentication - Does not redirect after authentication

Avatar of anand_007
anand_007 asked on
ASP.NET
5 Comments1 Solution640 ViewsLast Modified:
The problem I am facing is extremely bugging!! I am trying to use Form Authentication. My Login form is Login.aspx and the form being authenticated is Report.aspx. I have modified the web.config as follows:

 <authentication mode="Forms">
            <forms name=".AuthenticationCookie" loginUrl="Login.aspx"
               protection="All" timeout="60" path="/">
            </forms>
    </authentication>
   
      <!--  AUTHORIZATION
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
          (unauthenticated) users.
    -->

    <authorization>
        <deny users="*"/> <!-- Deny all users -->
    </authorization>
   
I have written this in the Login.aspx.cs file for Authentication. I am taking the UserName and password from the Login form, validating from a table in an Oracle  database. Finally I am doing this ..

    if(reader.Read())
    {
          FormsAuthentication.RedirectFromLoginPage(txtUserName.Text.ToUpper(), true);
          Response.Redirect("Report.aspx");
    }

I ran the code in debug mode and found this code is reached. My FormsAuthentication code gets executed .. so does my Response.Redirect. However, the redirection doesn't take place. I get back to my login page again. I read in one of the sites that I should remove Anonymous Access from the Security tab under my Project in IIS. Even this doesn't seem to help. Can anyone out there help me please??

I am using Win 2K Server and ASP.NET 1.1 (.NET 2003). Thanks in advance!!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros