Credentials and authentication

Discussion in 'ASP .Net' started by Tim Mavers, Dec 3, 2004.

  1. Tim Mavers

    Tim Mavers Guest

    I am trying to figure out a way of including the crendentials of the user
    that the ASP worker process is using (impersonating) in an HTTP request to
    my web site.

    Basically I have anonymous access disabled (using just basic
    authentication). In my asp.net code I make a web request to my own site
    asking for some data (sort of like a web service request). The problem is
    that the request fails when anonymous access is disabled.

    The only user that has access to this site is the user that the ASP.NET WP
    is running as (which I configured in IIS Service Manager). Is there a way
    to programatically grab the credentials of this user and pass it along in my
    request?

    Thanks,
    Tim Mavers, Dec 3, 2004
    #1
    1. Advertising

  2. Tim Mavers

    bruce barker Guest

    you can if you use basic authenication. you have two options:

    1) turn on impersonation in web config, and set the credials in the
    webrequest to the current credentials

    wc.Credentials = CredentialCache.DefaultCredentials

    2) mime the http headers for the login and password (the password is just
    base64 encoded), and fill in the credentials in the web request.

    -- bruce(sqlwork.com)


    "Tim Mavers" <> wrote in message
    news:...
    | I am trying to figure out a way of including the crendentials of the user
    | that the ASP worker process is using (impersonating) in an HTTP request to
    | my web site.
    |
    | Basically I have anonymous access disabled (using just basic
    | authentication). In my asp.net code I make a web request to my own site
    | asking for some data (sort of like a web service request). The problem is
    | that the request fails when anonymous access is disabled.
    |
    | The only user that has access to this site is the user that the ASP.NET WP
    | is running as (which I configured in IIS Service Manager). Is there a way
    | to programatically grab the credentials of this user and pass it along in
    my
    | request?
    |
    | Thanks,
    |
    |
    bruce barker, Dec 3, 2004
    #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. jadher
    Replies:
    1
    Views:
    3,576
    William F. Robertson, Jr.
    Oct 11, 2004
  2. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    Passing credentials to windows integrated authentication

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 26, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    3,513
    Girish bharadwaj
    Oct 26, 2004
  3. kplkumar
    Replies:
    0
    Views:
    432
    kplkumar
    May 11, 2006
  4. Max2006
    Replies:
    2
    Views:
    479
    Steven Cheng [MSFT]
    Jun 5, 2008
  5. Douglas J. Badin
    Replies:
    4
    Views:
    317
    Yan-Hong Huang[MSFT]
    Jan 29, 2004
Loading...

Share This Page