FormsAuthentication.RedirectFromLoginPage is not working <p>I am working on a LoginPage.Everything related to database or C# code is working fine but after successul login I am unable to redirect to Home.aspx,am I missing Something? Pls help. <strong>Code:</strong></p> <p><strong>Web.Config:</strong></p> <p> </p> <pre><code>&lt;/authentication&gt; &lt;authorization&gt; &lt;deny users="*"/&gt; &lt;/authorization&gt; </code></pre> <p><strong>C# Code:</strong></p> <pre><code>protected void Button1_Click(object sender, EventArgs e) { string source = "server=localhost\\sqlexpress;Database=LogInDB;Trusted_Connection=True"; SqlConnection con = new SqlConnection(source); con.Open(); SqlCommand cmd = new SqlCommand("proc_LogIn", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ID", SqlDbType.Int).Value = TextBox1.Text; cmd.Parameters.Add("@Password", SqlDbType.VarChar).Value = TextBox2.Text; SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read()) { FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, false); } else { Response.Write("Invalid credentials"); } } </code></pre>