Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2004, 04:27 AM
CBS CBS is offline
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default The request failed with HTTP status 401: Unauthori

I am currently having problems with access rights to the web services on a local Intranet site. The site is installed on a Windows 2000 server and uses integrated windows security to enable access to the site and services. Anonymous access is switched off. All the clients are running on Windows XP and both the server and clients belong to the same domain. The code uses the "CredentialCache.DefaultCredentials" to identify users and when they access the site via the web browser it works quite happily. However, there is also a windows application which utilises Web services which fails with the above message. The code originally worked, but I believe due to an unknown change in our infrastructure is now failing. If I run the application on the server and specify "localhost" it works quite happily. Still running it from the server if I then change "localhost" to the fully qualified name it fails. Yet when I manually use the same address of the services in a web browser it quite happily navigates there and provides the service. At first I was getting a message about the service being closed and I thought it may be to do with a known ".Net" bug. However, I now believe it may be related to security. The only additional information I get relating to the error is as follows " _COMPlusExceptionCode: -532459699".

 
Old August 19th, 2004, 07:34 AM
CBS CBS is offline
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A bit more info relating to my post. I examined the error base exception and got this extra information.
{System.Net.WebException}
    System.InvalidOperationException: {System.Net.WebException}
    m_Status: ProtocolError
    m_Response: {System.Net.HttpWebResponse}
    Status: ProtocolError
    Response: {System.Net.HttpWebResponse}

 
Old November 24th, 2004, 09:47 AM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I work with CBS and have had this pushed onto me to try and solve as no progress has been made in the last couple of months.

What I have discovered is that when this is running on the server (I have tried both 2000 sp4 and 2003) I get the same error no matter where I attempt to run the application from. However if I set up the application on my local machine (XP Pro sp1) then it runs perfectly happily and anyone with the necessary permissions can run the application. Unfortunately I have no wish to turn my machine into a server so this is only a very temprary solution.

Has anyone experienced a similar problem that seems to imply a problem with the server's architecture and if so, did you manage to find a solution?

Many thanks to any and all who can help.

 
Old November 30th, 2004, 10:07 AM
CBS CBS is offline
Registered User
 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We have a resolution which I'm posting just in case it is of use to anyone else with a similar problem. Basically we had to set the Proxy in the code to use port 80. I assume that something in our local infrastructure changed to prevent the application from working without this. If you have a similar problem check what port is being used for Intranet/Internet access and use similar code to below to set it accordingly. The object _GenTri is the webservice object and I'm simply setting the proxy property equal to the proxyobject.

IWebProxy proxyObject = new WebProxy("http://localhost:80", true);
_GenTri.Proxy = proxyObject;






Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP Status 404 rivcam JSP Basics 7 June 3rd, 2008 09:32 PM
request failed with HTTP status 401: Unauthorized deeptisingh20 ASP.NET 1.0 and 1.1 Basics 13 December 7th, 2007 04:26 PM
HTTP Status 403 jsp101 JSP Basics 1 October 16th, 2007 08:59 AM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM
HTTP status 404 brianjs JSP Basics 2 October 26th, 2003 03:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.