By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,311 Members | 1,197 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,311 IT Pros & Developers. It's quick & easy.

The request failed with HTTP status 401: Access Denied.

P: n/a
I have created a simple web service in VC# that adds two numbers. It returns
an integer value to the client once invoked.
I used Visual Studio .NET 2003, Windows XP Pro and .NET 1.1.

I created a Windows form client. While debugging I get the following error :

Unhandled Exception: System.Net.WebException: The request failed with HTTP
status 401: Access Denied.

in the following line:

object[] results = this.Invoke("myadd", new object[] {
a,
b});

"myadd" is the name of the function which adds the numbers. It takes in 2
integer values.

The environment runs on localhost.
Anonymous access is allowed.
I tried disabling the 'integrated windows authentication' but once I did it
& updated the client web reference, I was asked for username, password &
domain. So i checked it again.

Thank you!

--
Rgds,
Rachel
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

It sounds like there is a security setting on the application that you need
to work around. Normally, a new service won't have this issue, since the
default local dev box just uses the IIS default permissions.

It sure doesn't seem like anon access is allowed... Are you sure the
account that the app runs as has log in as service permission on the
machine?

Dan
--------------------
Thread-Topic: The request failed with HTTP status 401: Access Denied.
thread-index: AcTjiveFOIoLAyDMTkuCJ5bBZHRA/Q==
X-WBNR-Posting-Host: 213.42.2.23
From: =?Utf-8?B?UmFjaGVs?= <Ra****@discussions.microsoft.com>
Subject: The request failed with HTTP status 401: Access Denied.
Date: Thu, 16 Dec 2004 08:19:07 -0800
Lines: 29
Message-ID: <83**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8129
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

I have created a simple web service in VC# that adds two numbers. It
returns
an integer value to the client once invoked.
I used Visual Studio .NET 2003, Windows XP Pro and .NET 1.1.

I created a Windows form client. While debugging I get the following error :

Unhandled Exception: System.Net.WebException: The request failed with HTTP
status 401: Access Denied.

in the following line:

object[] results = this.Invoke("myadd", new object[] {
a,
b});

"myadd" is the name of the function which adds the numbers. It takes in 2
integer values.

The environment runs on localhost.
Anonymous access is allowed.
I tried disabling the 'integrated windows authentication' but once I did it
& updated the client web reference, I was asked for username, password &
domain. So i checked it again.

Thank you!

--
Rgds,
Rachel

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.