Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > custom authenticate users, how?

Reply
Thread Tools

custom authenticate users, how?

 
 
Jeff
Guest
Posts: n/a
 
      05-14-2009
hi

asp.net 3.5

I'm wondering how to implement a custom authenication process.

When the user loggs in I have to check if that user exists in another
datasystem, if he exists then update the database with information about
that user and authenticate the user....

I thought Membership.ValidateUser did the trick but it only validates the
username and passwords...
what method do I need to invoke for it to authenticate the user?

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
}


 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      05-14-2009
http://www.google.com/search?hl=en&q...vider&aq=f&oq=

Google "Custom Membership Provider"


//authenticate the user//

Huh?

There are default and custom RoleProviders as well.

What does "authenticate the user" mean to you?



"Jeff" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> hi
>
> asp.net 3.5
>
> I'm wondering how to implement a custom authenication process.
>
> When the user loggs in I have to check if that user exists in another
> datasystem, if he exists then update the database with information about
> that user and authenticate the user....
>
> I thought Membership.ValidateUser did the trick but it only validates the
> username and passwords...
> what method do I need to invoke for it to authenticate the user?
>
> protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
> {
> }
>



 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      05-14-2009
http://www.4guysfromrolla.com/articles/120705-1.aspx

I would read those articles for a more bird's eye view of what
Membership,Role and Profile providers can do, and how to work in a custom
providers if needed.


"Jeff" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> hi
>
> asp.net 3.5
>
> I'm wondering how to implement a custom authenication process.
>
> When the user loggs in I have to check if that user exists in another
> datasystem, if he exists then update the database with information about
> that user and authenticate the user....
>
> I thought Membership.ValidateUser did the trick but it only validates the
> username and passwords...
> what method do I need to invoke for it to authenticate the user?
>
> protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
> {
> }
>



 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      05-14-2009
//authenticate the user//

I mean login the user


"sloan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> http://www.google.com/search?hl=en&q...vider&aq=f&oq=
>
> Google "Custom Membership Provider"
>
>
> //authenticate the user//
>
> Huh?
>
> There are default and custom RoleProviders as well.
>
> What does "authenticate the user" mean to you?
>
>
>
> "Jeff" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> hi
>>
>> asp.net 3.5
>>
>> I'm wondering how to implement a custom authenication process.
>>
>> When the user loggs in I have to check if that user exists in another
>> datasystem, if he exists then update the database with information about
>> that user and authenticate the user....
>>
>> I thought Membership.ValidateUser did the trick but it only validates the
>> username and passwords...
>> what method do I need to invoke for it to authenticate the user?
>>
>> protected void Login1_Authenticate(object sender, AuthenticateEventArgs
>> e)
>> {
>> }
>>

>
>



 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      05-14-2009

First you say:
//but it only validates the
username and passwords...//

Then you say
//authenticate the user//
or
//I mean login the user//

And you say the first thing ("but it only validiates....") is *not* either
of the second items listed.


Huh?


I would read the 4 guys article(s)..........then post some better questions.




Here is your simplest (and not really useful) authentication:


protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{

bool isAuthenticated = true; // do your checks here // as is, this code
is not very useful

e.Authenticated = isAuthenticated ;

Console.WriteLine(e.Authenticated.ToString());


}




"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> //authenticate the user//
>
> I mean login the user
>
>
> "sloan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> http://www.google.com/search?hl=en&q...vider&aq=f&oq=
>>
>> Google "Custom Membership Provider"
>>
>>
>> //authenticate the user//
>>
>> Huh?
>>
>> There are default and custom RoleProviders as well.
>>
>> What does "authenticate the user" mean to you?
>>
>>
>>
>> "Jeff" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> hi
>>>
>>> asp.net 3.5
>>>
>>> I'm wondering how to implement a custom authenication process.
>>>
>>> When the user loggs in I have to check if that user exists in another
>>> datasystem, if he exists then update the database with information about
>>> that user and authenticate the user....
>>>
>>> I thought Membership.ValidateUser did the trick but it only validates
>>> the username and passwords...
>>> what method do I need to invoke for it to authenticate the user?
>>>
>>> protected void Login1_Authenticate(object sender, AuthenticateEventArgs
>>> e)
>>> {
>>> }
>>>

>>
>>

>
>



 
Reply With Quote
 
sqlman
Guest
Posts: n/a
 
      05-15-2009
On Thu, 14 May 2009 19:32:29 +0200, "Jeff"
<(E-Mail Removed)> wrote:

>hi
>
>asp.net 3.5
>
>I'm wondering how to implement a custom authenication process.
>
>When the user loggs in I have to check if that user exists in another
>datasystem, if he exists then update the database with information about
>that user and authenticate the user....
>
>I thought Membership.ValidateUser did the trick but it only validates the
>username and passwords...
>what method do I need to invoke for it to authenticate the user?
>
>protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
>{
>}
>


In a web service, one good approach is to employ SOAP headers and your
own custom authentication module:
http://msdn.microsoft.com/en-us/libr...6a(VS.80).aspx

This way you can build your own authentication layer that can depend
on any kind of user profile storage (database, flat file, you name
it...)

When it comes to web pages, you can do Forms authentication or
similar. More info here:
http://msdn.microsoft.com/en-us/library/aa302415.aspx

In both cases you can implement your own Identity and IPrincipal and
make your roles work the way you want.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
authenticate as guest when computer or user information is unavailable Graham Turner Wireless Networking 5 03-14-2005 09:42 PM
Custom authentication using a HttpModule. Knowing when to authenticate ... Thomas Mandelid ASP .Net Security 0 07-06-2004 09:05 AM
PIX 515E and Windows 2003 CA authenticate problem Torsten Stier Cisco 3 05-26-2004 09:38 AM
Re: PIX 525 does not authenticate Windows 2000 CA Richard Sanderson Cisco 1 01-22-2004 02:43 PM
Using Cisco ACS to authenticate against LDAP through SSL Silvio Arcangeli Cisco 0 10-20-2003 11:08 AM



Advertisments