Small problem with custom membership provider hopefully!

Discussion in 'ASP .Net' started by Erik, Dec 9, 2007.

  1. Erik

    Erik Guest

    Hi Everyone,

    Hopefully this is an easy one. I've googled around for the answer but cant
    find it.

    I have simple login page that authenticates via a web service. I am using a
    custom membership provider which simply send the username and password to
    the web service and I get back a user ID if authentication passes.

    The problem is that I don't know how to get the UserID back to the login
    page or store it in a session so that I can use it later on. I need the
    UserID to pass back in all web service calls to get the relevant data for
    that user.

    Does anyone know how to pass back data from the custom membership provider?

    BTW, I dont want to use a local SQL db to store any data to persist it. This
    is all done via the web service

    Many thanks

    Erik
     
    Erik, Dec 9, 2007
    #1
    1. Advertising

  2. Enable Forms Authentication and use your "authenticated" mechanism to create
    a formsauthentication ticket which is stored in a cookie. You can use the
    Application_AuthenticateRequest event in Global.asax, which fires for every
    request, to see that the user has authenticated. For example code, search the
    web or go to the QUICKSTART app tutorials at the asp.,net site.
    -- Peter
    http://www.eggheadcafe.com
    http://petesbloggerama.blogspot.com
    http://www.blogmetafinder.com


    "Erik" wrote:

    > Hi Everyone,
    >
    > Hopefully this is an easy one. I've googled around for the answer but cant
    > find it.
    >
    > I have simple login page that authenticates via a web service. I am using a
    > custom membership provider which simply send the username and password to
    > the web service and I get back a user ID if authentication passes.
    >
    > The problem is that I don't know how to get the UserID back to the login
    > page or store it in a session so that I can use it later on. I need the
    > UserID to pass back in all web service calls to get the relevant data for
    > that user.
    >
    > Does anyone know how to pass back data from the custom membership provider?
    >
    > BTW, I dont want to use a local SQL db to store any data to persist it. This
    > is all done via the web service
    >
    > Many thanks
    >
    > Erik
    >
     
    Peter Bromberg [C# MVP], Dec 9, 2007
    #2
    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. John
    Replies:
    3
    Views:
    4,397
    stribbed
    Jun 21, 2007
  2. sloan
    Replies:
    5
    Views:
    1,528
    sloan
    Jun 4, 2006
  3. Replies:
    0
    Views:
    772
  4. sloan
    Replies:
    1
    Views:
    549
    Chad Scharf
    Jul 3, 2007
  5. Brett Ossman

    Custom Membership Provider - Custom Error Messages

    Brett Ossman, Mar 11, 2009, in forum: ASP .Net Security
    Replies:
    0
    Views:
    801
    Brett Ossman
    Mar 11, 2009
Loading...

Share This Page