I have prototyped a winforms app with a couple of browses and entry forms, using the login code from the role based security tutoiral.
All works fine with the winform app.
Today I added a web site to the solution, inherting much of the logic and forms from the asp.net tutorial.. and when I try to login to the application, the login manager is accessed and prevents me logging in if I do not pass a valid user name and passord. when I pass a valid user name and password I am getting
Type is not resolved for member 'Model.AppIdentity,Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
try {
LoginCredential credential = new LoginCredential(
mUserNameTextBox.Text.Trim(), EncryptPassword(mPasswordTextBox.Text.Trim()), mDomainTextBox.Text);
PersistenceManager.DefaultManager.Login(credential);
FormsAuthentication.RedirectFromLoginPage(mUserNameTextBox.Text, true);
} catch (LoginException expt) {
if (expt.ExceptionType == LoginExceptionType.InvalidUserName) {
SetError( "Invalid User Name");
} else if (expt.ExceptionType == LoginExceptionType.InvalidPassword) {
SetError( "Invalid Password");
} else {
SetError(expt.Message);
}
return;
}
I get a debug message on the FormAuthentication.RedirectFromLoginpage line above.
Any thoughts or help would be appreciated.
Dennis
|