ASP.NET - Hi All, - Asked By rajesh kokul on 29-Nov-12 02:30 AM

I am using membership in MVC project.

 if (ModelState.IsValid)
               if (Membership.ValidateUser(model.username.Trim(), model.password.Trim()))  
//control goes directly to else from here even i type correct username and password.
                       FormsAuthentication.SetAuthCookie(model.username, true);

Please help me...Thank in advance
Hemanth Kumar replied to rajesh kokul on 03-Dec-12 04:25 AM
Hi Rajesh,

I think your code looks clear.Check your code in debug mode.Here are few links which may help you