membership provider

Discussion in 'ASP .Net' started by John, May 17, 2006.

  1. John

    John Guest

    OK, I read and read again information on using the logon control, 'custom
    providers' but none are really helping me out with creating a provider to
    go against my database to validate the users logging into my web app. What
    happens when a user logs into my site is, 8 queries are executed, 1 verfies
    the user, and the others get data pertaining to that users id, so drop downs
    are populated for that user, etc., So is it possible to use the 2.0
    providers to do this same thing, and can someone show me some code of a
    provider going against a SQL database (not the membership one 2.0 creates)
    your own DB, to validate users loggging into your web app?

    going nuts
    John, May 17, 2006
    #1
    1. Advertising

  2. John

    sloan Guest

    My rudimentary understanding is that the membership provider is for
    authentication
    updates to info/security/roles etc

    http://msdn2.microsoft.com/en-US/library/f1kyba5e.aspx

    In your case, I think your login screen needs to use the custom provider..
    and then REDIRECT to the next page,
    where (because you're verified) you run your routines.
    The login screen should be nothing but authentication,, the redirect happens
    after you are verified, and the next page does your custom needs.

    I'm not sure what db youre using, but .....
    If you're running 8 seperate queries, my thoughts would be to put these into
    1 stored procedure and populate 1 strongly typed DataSet, with 8 tables in
    it.
    That way, you're only hitting the db twice.

    Once on the verification/login screen.
    then REDIRECT
    then once to get the 8tables of info.

    I think you're barking up the wrong tree trying to have this functionality
    merged.

    ...




    "John" <> wrote in message
    news:...
    > OK, I read and read again information on using the logon control, 'custom
    > providers' but none are really helping me out with creating a provider to
    > go against my database to validate the users logging into my web app. What
    > happens when a user logs into my site is, 8 queries are executed, 1

    verfies
    > the user, and the others get data pertaining to that users id, so drop

    downs
    > are populated for that user, etc., So is it possible to use the 2.0
    > providers to do this same thing, and can someone show me some code of a
    > provider going against a SQL database (not the membership one 2.0 creates)
    > your own DB, to validate users loggging into your web app?
    >
    > going nuts
    >
    >
    sloan, May 17, 2006
    #2
    1. Advertising

  3. well, the thing is that I took the existing app from an former developer and
    I'm migrating it to 05. The current login screen in asp.net 1.1 is callking
    the 8 queries to populate dropdowns, grids, etc on the next page once the
    user is verfied. What I'm doing is, I created my login screen and validating
    the user only if the user exists in the DB then doing a redirect to the next
    page, then doing my processing there.

    When I stepped through the current app I noticed what he's doing just on the
    login screen alone. He's validatiing the user, then taken the userid and
    running 7 more queries to pull data and put into a user object then passing
    to queries to load the drop downs, etc.
    After thinking about I might be doing it correctly on my version of the
    login screen.
    because I'm just validating via forms auth.



    "sloan" wrote:

    >
    > My rudimentary understanding is that the membership provider is for
    > authentication
    > updates to info/security/roles etc
    >
    > http://msdn2.microsoft.com/en-US/library/f1kyba5e.aspx
    >
    > In your case, I think your login screen needs to use the custom provider..
    > and then REDIRECT to the next page,
    > where (because you're verified) you run your routines.
    > The login screen should be nothing but authentication,, the redirect happens
    > after you are verified, and the next page does your custom needs.
    >
    > I'm not sure what db youre using, but .....
    > If you're running 8 seperate queries, my thoughts would be to put these into
    > 1 stored procedure and populate 1 strongly typed DataSet, with 8 tables in
    > it.
    > That way, you're only hitting the db twice.
    >
    > Once on the verification/login screen.
    > then REDIRECT
    > then once to get the 8tables of info.
    >
    > I think you're barking up the wrong tree trying to have this functionality
    > merged.
    >
    > ...
    >
    >
    >
    >
    > "John" <> wrote in message
    > news:...
    > > OK, I read and read again information on using the logon control, 'custom
    > > providers' but none are really helping me out with creating a provider to
    > > go against my database to validate the users logging into my web app. What
    > > happens when a user logs into my site is, 8 queries are executed, 1

    > verfies
    > > the user, and the others get data pertaining to that users id, so drop

    > downs
    > > are populated for that user, etc., So is it possible to use the 2.0
    > > providers to do this same thing, and can someone show me some code of a
    > > provider going against a SQL database (not the membership one 2.0 creates)
    > > your own DB, to validate users loggging into your web app?
    > >
    > > going nuts
    > >
    > >

    >
    >
    >
    =?Utf-8?B?Q1NoYXJwZ3V5?=, May 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BS
    Replies:
    3
    Views:
    2,044
    Alvin Bruney [MVP]
    Jun 17, 2004
  2. Nate Hekman
    Replies:
    0
    Views:
    3,003
    Nate Hekman
    Apr 25, 2005
  3. spp

    Sql Membership provider

    spp, Oct 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    514
  4. sloan
    Replies:
    5
    Views:
    1,497
    sloan
    Jun 4, 2006
  5. sloan
    Replies:
    1
    Views:
    500
    Chad Scharf
    Jul 3, 2007
Loading...

Share This Page