Posted on: 9/3/2012 3:29:30 AM | Views : 634

Hi All..
I've a problem that I can't log in to my asp .net app
and I didn't get any error or exception, so I can't decide where's the problem
although the username and pass are correct  as in the sql server
here is my log on action
[HttpPost]
public ActionResult LogOn(RegisterationModel model, string returnUrl)
{
if (ModelState.IsValid)
{
if (Membership.ValidateUser(model.Username, model.Password))
{
FormsAuthentication.SetAuthCookie(model.Username, true);
if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/")
&& !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\"))
{
return Redirect(returnUrl);
}
else
{
return RedirectToAction("Index", "Home");
}
}
else
{
ModelState.AddModelError("", "The user name or password provided is incorrect.");
}
} ...

Go to the complete details ...