Unauthorized Error

B

BigJohn

I receive the following error in a Web Service call from an ASP.Net to a
VB.Net service:

[WebException: The request failed with HTTP status 401: Unauthorized.]

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

I attempted the two resolutions suggested by Josh Twist without resolution.

I am running everything (ASP.net, IIS, SQL 2000, VB.Net service) locally on
a Windows XP Pro laptop. The service tests fine when debugging. The service
creates a new file on a specified directory, so on a hunch I gave all IDs
full control, but without resolution.

Any suggestions would be helpful.
 
M

Martin Kulov [MVP]

BigJohn said:
I receive the following error in a Web Service call from an ASP.Net to a
VB.Net service:

[WebException: The request failed with HTTP status 401: Unauthorized.]

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)

Hi BigJohn,

you probably are using Integrated Authentication for your web service
virtual directory. When you debug the web service you are accessing it with
the account that you are currently logged in. But when you access the web
service from ASP.NET site, you are actually trying to access the service
using the restricted ASPNET account. Enable the Anonymous Access for your
web service to allow everyone to access your service. Then give enough
permissions to ASPNET (the account that the service will run under with
anonymous access enabled) to create a file in a given directory. Search the
newsgroups for any other problems. This issue has been discussed for ages.

Good luck,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top