Re: Credentials and authentication

From: bruce barker (nospam_brubar_at_safeco.com)
Date: 12/03/04


Date: Fri, 3 Dec 2004 09:40:55 -0800

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" <webview@hotmail.com> wrote in message
news:GOCdnbpJr-FJ5C3cRVn-uw@giganews.com...
| 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,
|
|



Relevant Pages

  • Re: HELP with Impersonation
    ... to you web config. ... Then the impersonation should work as expected. ... I call the web service using: ... causes all request in my web service to use that impersonation. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Windows authentication for web service client??
    ... > Dim Response As System.Net.HttpWebResponse ... > make my http WEBDAV request here ... ... CredentialCache.DefaultCredentials will return the credentials that ... I have try the same approach using implicity impersonation, ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Impersonate() & ASPNET worker threads. Bug or undocumented feature?
    ... > impersonation on in web.config. ... > In my oppinion ASPNET worker process even in one request scope switches ... > The anonymous access for application should be forbidden, ... that ASPNET worker might switch threads while executing ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Forms Authentication and Impersonation
    ... On the IIS box, turn impersonation -off- in web.config so that asp.net ... Rewrite the page with your newfound knowledge of thread impersonation - ... recycle by allowing the request (this particular request of the aspx page ... so once the request to the file-accessing aspx page is ...
    (microsoft.public.inetserver.iis.security)
  • Can it work...? - ASP.NET Impersonation with Remoting
    ... I have an ASP.NET Web Page / Web Service that runs on IIS and uses ... Server expects a Principal token not a cheapo Impersonation token ... request it do the work (The Service will check the credentials and ...
    (microsoft.public.dotnet.framework.remoting)