RE: Unauthorized Error Calling Web Service

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

From: Francois Guerin (fguerin_at_newsgroup.nospam)
Date: 09/29/04


Date: Wed, 29 Sep 2004 05:21:02 -0700

Luke,

    I am aware of that. I am already passing the credentials when I call the
web service. The problem is that I get an unauthorized error on the FIRST
call, even if though the credentials are supplied. Does that mean that I
would need an extra Try... Catch just to capture the very first error? Is
this a bug or is this by design?

Francois

"[MSFT]" wrote:

> Hello,
>
> When a ASP.NET process is recycled on the server, all current session are
> terminated, and the IIS need to authenticated your client request again.
> However, the request may not contains credential information so that the
> IIS will return 401 error. to resolve the problem, we can just add some
> try...catch statement to get the exception and resend the request. Or you
> may take a look at following article to see if it can help on the problem:
>
> HOW TO: Pass Current Credentials to an ASP.NET Web Service
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q813834
>
> Luke



Relevant Pages

  • Re: Windows authentication for web service client??
    ... If you are posting to WEBDAV it is my understanding that you cannot use Integrated authentication since you HAVE to pass it the username and the password in the network credentials. ... I must put together a sample example, but for some reason the users credentials are lost when making the WebDAV request. ... web service is running ASPNET account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: 404 problems for simple web service in 2003 but not in 2000
    ... Can you please look in the IIS log file and tell us what the substatus ... code of the request is. ... > b) I have also installed .NET Framework 1.0 on this machine. ... > web service in it, while trying to debug at the point where it calls ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: 404 problems for simple web service in 2003 but not in 2000
    ... Can you please look in the IIS log file and tell us what the substatus ... code of the request is. ... > b) I have also installed .NET Framework 1.0 on this machine. ... > web service in it, while trying to debug at the point where it calls ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: 404 problems for simple web service in 2003 but not in 2000
    ... Can you please look in the IIS log file and tell us what the substatus ... code of the request is. ... > b) I have also installed .NET Framework 1.0 on this machine. ... > web service in it, while trying to debug at the point where it calls ...
    (microsoft.public.inetserver.iis)
  • Re: 404 problems for simple web service in 2003 but not in 2000
    ... Can you please look in the IIS log file and tell us what the substatus ... code of the request is. ... > b) I have also installed .NET Framework 1.0 on this machine. ... > web service in it, while trying to debug at the point where it calls ...
    (microsoft.public.inetserver.iis.security)