Re: 401 While Accessing Web Service

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Apr 29, 2:30 pm, "Nirosh" <Nir...@xxxxxxxx> wrote:
http://www.dotnetbips.com/articles/dbd724e9-78f0-4a05-adfb-190d151103...

check this and see..

--
L.W.C. Nirosh"Ben" <benm5...@xxxxxxxxx> wrote in message

news:b5138c67-4566-4595-84a2-336f6a582d1e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



I'm trying to access a c# web service from a web form.

I set up the web reference proxy object as follows:

   proxy.PreAuthenticate = true;
   proxy.Credentials = CredentialCache.DefaultCredentials;

but i get a 401 error.  If I switch the IIS website from Integrated
Windows Auth to Anonymous, it works... but i want it to use windows
security.

my web.config of the web form is set to imperonsate the logged on
user, and i verified that's working by checking that
this.User.Identity.Name is my domain user (which has access to the web
service).

Any ideas what i'm doing wrong? (btw, the web service is SSL if that
makes a difference).

Thanks!- Hide quoted text -

- Show quoted text -

thanks,
anyway to do it without using web form authentication?

the crazy thing is that if i fire up my web form from Visual Studio it
works just fine and can access the web service, but if i publish it to
another server and try from there I get the 401 (the site i'm
publishing to is using 'intergrated windows auth') .
.



Relevant Pages

  • Re: 401 While Accessing Web Service
    ... web service will be vulnerable, so to improve security use the WSE.. ... just converting the project to 2005 and enable wse won't do any good. ... Windows Auth to Anonymous, it works... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 401 While Accessing Web Service
    ... service security.. ... to avoid the dependacy with integrated authentication, ... for your web service, that way it should work fine. ... Windows Auth to Anonymous, it works... ...
    (microsoft.public.dotnet.framework.aspnet)
  • 401 While Accessing Web Service
    ... I'm trying to access a c# web service from a web form. ... Windows Auth to Anonymous, it works... ... this.User.Identity.Name is my domain user (which has access to the web ...
    (microsoft.public.dotnet.framework.aspnet)
  • Cannot read a Security Log from ASP.net web service
    ... I'm attempting to read the security event log for a WinXP Pro machine using ... a web form that calls a web service. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: 401 While Accessing Web Service
    ... for your web service, that way it should work fine. ... Windows Auth to Anonymous, it works... ... on an IIS site with intergrated windows auth, but the client side was C ...
    (microsoft.public.dotnet.framework.aspnet)