In your web.config change the Authentication section to the following:
<authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880"> <credentials passwordFormat="Clear"> <user name="test" password="test"/> </credentials> </forms> </authentication>
Then in the AccountModel.cs file, find the method ValidateUser and change the code to the following:
public bool ValidateUser(string userName, string password)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
return FormsAuthentication.Authenticate(userName, password);
}
The default setup should now work without using the provider.

0 comments:
Post a Comment