473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

The request failed with HTTP status 401: Access Denied.

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
1 9454
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robin Chatterjee | last post by:
Hi, I am constantly getting this error inspite of all that i do. Pls help if you can ASAP. My environment is 1. In the Webconfig i have <authentication mode="Windows"/> <identity...
7
by: Dhwanil Shah | last post by:
We are trying to refuse data display to users based on some internal criteria. The site uses Basic Authentication for security. Through ASP.NET we can send a status of 401. The request to our site...
3
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
0
by: Daniel Kopp | last post by:
Hi! I tried to implement custom error pages using the <customErrors> directive in a web.config file. It worked fine for "simple" errors like HTTP 404, like this example: <customErrors...
2
by: Sachin | last post by:
Scenario: Machine A: ASP.NET Web UI IIS 6.0 Windows Server 2003 Impersonation Account: domain\Acct1 Machine B: ASP.NET Web Service IIS 6.0
1
by: kaustubh_palande | last post by:
Dear friends, say i have 2 machines called (abc, xyz respectively) and 1 server, there is a DataBase and Report Server on that server and my website is on the abc machine. The website accesses the...
0
by: Shree | last post by:
While invoking the web service from client, I am setting the credentitals using the following code... ReportingService.Credentials = System.Net.CredentialCache.DefaultCredentials; But in...
2
by: vbsramesh | last post by:
Hi, i am ramesh working on MSPS 2007.i have created a webapplication(framework 2.0) with windows authentication. i am consuming MSPS web services provided by microsoft with windows authentication....
5
by: tyakimov | last post by:
Hi guys I got a problem On my IIS server I changed the password for the Internet Guest Account 'IUSR_Machine' and suddenly the PHP part of the intranet stopped working. - '... failed to open...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.