In Sharepoint 2010, We created a web application with classic authentication and started developing it. Later, we want to implement forms authentication to our project, so I created a new sharepoint web application with form based authentication enabled. I took the backup of the old site(classic auth.) and restored to the new site(fba). I implemented forms authentication by following the below link.
I created a custom sign-in page. After entering valid credentials, user is not redirected to Home page. Authentication is happening properly but it not redirecting to the home page. When I click on login button, it is again loading the same login page. Please find the below code for authenticating and redirecting to home page
protected void btnLogin2_Click(object sender, EventArgs e)
{
if(Membership.ValidateUser(txtUserId.Value, txtPassword.Value))
{
string link = "http://ejudnam:36414/sites/Prototype/Dashboard/Pages/default.aspx");
Response.Redirect(link);
//I tried with the below line also but it is of no use
// SPUtility.Redirect(link, SPRedirectFlags.Default, this.Context);
}
else
{
lblMessage.Text = "Login Failed.";
}
}
We are unable to figure out the issue. I tried so many solutions but they are of no use. Your help will be highly appreciated.
Thank You.