Print Page | Close Window

Type is not resolved for member

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=860
Printed Date: 23-Apr-2025 at 6:07pm


Topic: Type is not resolved for member
Posted By: dennism
Subject: Type is not resolved for member
Date Posted: 26-Jun-2008 at 4:29pm
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



Replies:
Posted By: davidklitzke
Date Posted: 27-Jun-2008 at 8:55am
This is known bug in the demo app that I haven't had time to fix.  My experience is that any response for name and password will work.  You can replace the code with your own code (look for examples on the web that do FormsAuthentication.RedirectFromLoginPage).


Posted By: rparas
Date Posted: 06-Jan-2009 at 6:55pm
Hi David. I'm also getting this error. I have a sample application and I removed every code except for the PersistenceManager.DefaultManager.Login() part and I'm still getting this error. The PM is working fine because after I login i was able to retrieve records (i was able to see this because i was stepping thru the code while debugging) but after the page loads, it displays the error message.

I would appreciate any help that you can give. Thanks!


Posted By: alejandro
Date Posted: 09-Jul-2009 at 4:37pm
I believe the problem is with Cassini (the MSFT web server for developers) . There is an issue when using custom identities and Cassini, a SerializationException is thrown. First check if it works when the app is running directly form IIS. If that is your problem  as a workaround you could make your AppIdentity class inherit from MarshalByRefObject.
public class AppIdentity : MarshalByRefObject, IIdentity { ...}
Hope this helps.



Print Page | Close Window