Im having difficulties logging in a user through my code.
Im creating a user in my code and this works fine. After creating the user i want to login the user and redirect him to a proteched page. But the user isent logged in correctly, the user is prompted for login on the protected page.
My code:
private void LoginToDynamicWeb(string _cUserName, string _cPassword)
{
Dynamicweb.Security sec = new Dynamicweb.Security();
sec.ExtranetLogin(_cUserName, _cPassword, true);
HttpContext.Current.Response.Redirect("/LoggedIn.aspx");
}
How can i login the user through code?