Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Overriding a factory class?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Overriding a factory class?
Divers
Thread ID:
00923516
Message ID:
00923516
Vues:
46
MM question :

MM has a User Manager, it has several distinct AuthenticateUser methods.
I created a new class based off of the MM class
my class is as follows :
class a4uUserManager : mmUserManager
in this class I override the AuthenticateUser item with my Own as follows :
public override bool AuthenticateUser(string companyID, string userID, string password)
{
	this.DatabaseKey = mmAppBase.AppSettingsMgr.GetSetting("SecurityDatabaseKey");
	return this.AuthenticateUser(companyID,userID,password,this.DatabaseKey);
} 
In there literature it says to override the Factory base class item for the mmUserManager
So I went in my small app and override's the mmUserManager as follows :
public class Factory : OakLeaf.MM.Main.Windows.Forms.mmFactoryDesktop
{
	public override mmUserManager CreateUserManager()
	{
		return new a4uUserManager();
	}

}
After I have done all of this on the button I want to call my AuthenticateUser Method
MM calls the AuthenticateUser method as follows :
this.Authenticated = mmAppBase.UserMgr.AuthenticateUser(
	this.txtUserID.Text.Trim(),
	this.txtPassword.Text.Trim(),
	databaseKey
	);
when I type mmAppBase.UserMgr. intellisense never picks up my authenticateUser Method
even though I inherited from mmUserManager and Overrode a method to cal my method which accepts 4 parameters.

What I get is when the form loads, it displays the MM error message, then it display my message.
It appears that it is loading the UserMgr from mm first then creates my a4uUserManager.

Can some one direct me to where I am going wrong.

What I am trying to accomplish in a nutshell is to take the mm user login form subclass it and add a new field on the form and in the security database for companyID.

Once I have this I want to Authenticate the User.

Why I am trying to do this is that I am going to have one security database and several application databases.
Once the user logs in I will know what database to connect to.

My users can't connect to a common app database, because they want the data segregated from other users eyes...security ISSUE in the data portion.


Any help would be appreciated.
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform