New Posts New Posts RSS Feed: ASPNet Security and my own table
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

ASPNet Security and my own table

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 227
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: ASPNet Security and my own table
    Posted: 16-Dec-2010 at 5:25am
In my user database, I have a table called Users, which has a field called UserCd which is the login and a field called password. I want to use ASPNet Security but with my own table called users. Is there sample code showing how to do that?
 
Bill
 
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 708
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 17-Dec-2010 at 2:55pm
Bill;

It is possible to use your own tables with ASP.NET Membership because it uses a provider model. However, this is outside the scope of DevForce and it is not encouraged to do so. You can see the website below for more info.

http://weblogs.asp.net/scottgu/archive/2005/10/17/427731.aspx

A few suggestions:

1. You can issue a Forms authentication ticket (cookie) when a login occurs and not use the whole ASP.NET Membership architecture. To do this, you could sub-type the AspNetAuthenticatingLoginManager and override the ValidateUserCore method to do your own validation against your own user table.

2. Or you can implement your own login manager entirely and just call FormsAuthentication.SetAuthCookie to set the cookie.

Hope this helps.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down