Hi all,
We currently have our own customer/login tables in our database linked with
CustomerID columns of both tables. Some of the requirements of the system are
1) When I validate users, I need to pass more parameters than just
username/password, for example customers are created for different clients,
so I need to pass our ClientID with username/password together. We build one
portal to support multiple clients.
2) When a customer is validated, I need to get CustomerID instead of
username from Context.User.Identity.
By implementing MembershipProvider class, I don't think I can achieve any of
requirement mentioned above. Do I miss something or there are some other
tricks I don't know?
Thanks for any suggestions or comments!
--
Regards
Hardy 3 1607
You can certainly implement what you describe, you will need to write a
custom MembershipProvider that derives from the ProviderBase class.
There is plenty of sample code around for implementing custom Membership,
Profile, and Roles providers.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Hardy Wang" wrote:
Hi all,
We currently have our own customer/login tables in our database linked with
CustomerID columns of both tables. Some of the requirements of the system are
1) When I validate users, I need to pass more parameters than just
username/password, for example customers are created for different clients,
so I need to pass our ClientID with username/password together. We build one
portal to support multiple clients.
2) When a customer is validated, I need to get CustomerID instead of
username from Context.User.Identity.
By implementing MembershipProvider class, I don't think I can achieve any of
requirement mentioned above. Do I miss something or there are some other
tricks I don't know?
Thanks for any suggestions or comments!
--
Regards
Hardy
Sorry, I implemented MembershipProvider class, ValidateUser only accepts 2
parameters, but I need more.
public override bool ValidateUser(string username, string password) {
}
How can I do it?
Let me do a search around.
--
Regards
Hardy
"Peter Bromberg [C# MVP]" wrote:
You can certainly implement what you describe, you will need to write a
custom MembershipProvider that derives from the ProviderBase class.
There is plenty of sample code around for implementing custom Membership,
Profile, and Roles providers.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Hardy Wang" wrote:
Hi all,
We currently have our own customer/login tables in our database linked with
CustomerID columns of both tables. Some of the requirements of the system are
1) When I validate users, I need to pass more parameters than just
username/password, for example customers are created for different clients,
so I need to pass our ClientID with username/password together. We build one
portal to support multiple clients.
2) When a customer is validated, I need to get CustomerID instead of
username from Context.User.Identity.
By implementing MembershipProvider class, I don't think I can achieve any of
requirement mentioned above. Do I miss something or there are some other
tricks I don't know?
Thanks for any suggestions or comments!
--
Regards
Hardy
How about we create a ValidateUserEx method that accepts all your parameters,
and you forward the call with the username, password to the overridden base
class method?
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Hardy Wang" wrote:
Sorry, I implemented MembershipProvider class, ValidateUser only accepts 2
parameters, but I need more.
public override bool ValidateUser(string username, string password) {
}
How can I do it?
Let me do a search around.
--
Regards
Hardy
"Peter Bromberg [C# MVP]" wrote:
You can certainly implement what you describe, you will need to write a
custom MembershipProvider that derives from the ProviderBase class.
There is plenty of sample code around for implementing custom Membership,
Profile, and Roles providers.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Hardy Wang" wrote:
Hi all,
We currently have our own customer/login tables in our database linked with
CustomerID columns of both tables. Some of the requirements of the system are
>
1) When I validate users, I need to pass more parameters than just
username/password, for example customers are created for different clients,
so I need to pass our ClientID with username/password together. We build one
portal to support multiple clients.
>
2) When a customer is validated, I need to get CustomerID instead of
username from Context.User.Identity.
>
By implementing MembershipProvider class, I don't think I can achieve any of
requirement mentioned above. Do I miss something or there are some other
tricks I don't know?
>
Thanks for any suggestions or comments!
--
Regards
Hardy
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: WB |
last post by:
Hi,
I am revamping my company's website with ASP.Net 2.0. In order to use our
existing user data in our SQL 2000, I have written a custom membership
provider. However, when I try to logon with...
|
by: Morgan |
last post by:
Sorry for cross post, forgot to include aspnet in orinal...
Thanks in advance for any assistance.
I'm in the process of implementing custom RoleProvider & Membership Provider
objects and have...
|
by: John |
last post by:
Hi
I was working fine with create user wizard and the default membership
provider. I have now customised the membership provider as per attached
web.config. The create user wizard picks up the...
|
by: ad |
last post by:
I have create a custom membership provider.
The common usage of custom membership is set it as default Membership
Provider win web.config, and use login controls with it.
How can I use custom...
|
by: Paul Keegstra |
last post by:
Hi,
I am currently working on an asp.net 2.0 web site that is a replacement of a
classic asp web site. The current web site uses a Commerce Server 2002
database for storing user information. ...
|
by: Balaji |
last post by:
Hi All,
Can I use more than one membership provider for a given website? I
understand only one of them could be default one. If yes, then how to
programmatically access the other membership...
|
by: ryan.mclean |
last post by:
Hello everyone,
I am wondering, can the membership provider be changed at runtime?
Perhaps the connectionStringName?
I would like to use a different database based on the server the site
is...
|
by: thomas |
last post by:
Hello All,
How to change the default Membership Provider during the runtime?
I know I can reference any provider I want, e.g.: provider =
Membership.Providers
but the question is how to...
|
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= |
last post by:
I have been having some trouble with implementing a custom Membership
Provider. We have a custom data store and business logic that pulls user
information. I need some level of functionality...
|
by: Ben |
last post by:
Hi,
When an anonymous user has created an new account (with the CreateUserWizard
control), i want to let asp.net generate a password and to send it to the
address of the email provided by the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |