Re: 401 While Accessing Web Service
- From: Ben <benm5678@xxxxxxxxx>
- Date: Tue, 29 Apr 2008 12:57:36 -0700 (PDT)
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') .
.
- Follow-Ups:
- Re: 401 While Accessing Web Service
- From: Nirosh
- Re: 401 While Accessing Web Service
- References:
- 401 While Accessing Web Service
- From: Ben
- Re: 401 While Accessing Web Service
- From: Nirosh
- 401 While Accessing Web Service
- Prev by Date: SOLVED i think Re: CreateUserWizard control: forcing it to use a programmatically provided username and e-mail
- Next by Date: Checking server status via ASP.net
- Previous by thread: Re: 401 While Accessing Web Service
- Next by thread: Re: 401 While Accessing Web Service
- Index(es):
Relevant Pages
|