473,587 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unauthorized Error Calling Web Service

Hi,

try to set the PreAuthenticate property on the client proxy to true - i never needed this but the docs sound like that this could solve your problems.

---
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

nntp://news.microsoft. com/microsoft.publi c.dotnet.framew ork.webservices/<05************ *************** *******@microso ft.com>

I have an application calling a web service on a different machine. The
application code runs under a local user account on the application server.
The account (identical username/password) is created on the web service
server. The web service uses Windows integrated security and ACLs are set on
the web service to allow the remote application to use it.

The problem is that everytime IIS' is recycled, I get an "unauthoriz ed"
error on the FIRST call to the web service. Subsequent calls are fine. There
seems to be some type of retry process as I get the error first, and then the
data. The IIS log sample below shows that, with two 401 error codes and one
200 code. These three lines are ONE call to the web service from an
application point of view. I actually have two different web services that
behaves identically. Here's a sample of the IIS log:

2004-08-17 09:59:35 XXX.XX.XX.XXX POST
/AppCommonWebS/Classes/clsAPP_Employee sWebS.asmx - 80 - XXX.XX.XX.XX Mozilla/4.0+(compatible ;+MSIE+6.0;+MS+ Web+Services+Cl ient+Protocol+1 .1.4322.573) 401 2 2148074254
2004-08-17 09:59:35 XXX.XX.XX.XXX POST
/AppCommonWebS/Classes/clsAPP_Employee sWebS.asmx - 80 - XXX.XX.XX.XX Mozilla/4.0+(compatible ;+MSIE+6.0;+MS+ Web+Services+Cl ient+Protocol+1 .1.4322.573) 401 1 0
2004-08-17 09:59:35 XXX.XX.XX.XXX POST
/AppCommonWebS/Classes/clsAPP_Employee sWebS.asmx - 80 PC12\APPUSER
XXX.XX.XX.XX Mozilla/4.0+(compatible ;+MSIE+6.0;+MS+ Web+Services+Cl ient+Protocol+1 .1.4322.573) 200 0 0

--
Thank you.

[microsoft.publi c.dotnet.framew ork.webservices]
Nov 21 '05 #1
0 2339

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
12510
by: Vijayakrishna Pondala | last post by:
Hi, I am using the following C# code to connect to and download information from a URL. (The pages are on JBoss server and we are using NTLM authentication to connect to the server). ---- string url = "http://internal.ourcompany.com:8010/Page1"; WebRequest wreq = WebRequest.Create(url); //Assign the default logon creadentials.
0
1446
by: Kyle Baley | last post by:
I'm developing an MCMS web service and am getting a 401 unauthorized error when I try to consume it from a client. It works fine when I use the test harness to navigate to the asmx file directly. And it also works when the service is on a remote server. It occurs only when I call the service locally. Details: - It doesn't seem to matter...
1
1313
by: Phil396 | last post by:
I have a web service that works fine on the development server but will not work in production. In IIS Admin I have tried just about everything to get past the HTTP status 401:Unauthorized error with little or no success. I have tried everythng from allowing anonmousy access to allowing script source access. I have also tried passing the...
1
3159
by: Dave | last post by:
I'm trying to make a webrequest to another server on our webfarm (to synch the cache as explained in http://www.eggheadcafe.com/articles/20030420.asp) but I'm getting a 401 unauthorized error. We are using service accounts for the app to run under which I thought would work in setting the webrequest's credentials property but with no...
2
1161
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
0
731
by: Francois Guerin | last post by:
I have an application calling a web service on a different machine. The application code runs under a local user account on the application server. The account (identical username/password) is created on the web service server. The web service uses Windows integrated security and ACLs are set on the web service to allow the remote application...
2
3574
by: ALI-R | last post by:
Hi All, I have a webservice on a win 2003 server and I'm trying to call it from another win2003 server which is hosting my sharepoint portal server. I am trying to call that webservice from a webpart but I get this error which says : System.Net.WebException: The request failed with HTTP status 401: Unauthorized. at...
0
1682
by: David Davis | last post by:
I am setting up some collaboration software called eProject for a client. eProject is a web based asp application. During setup, the instructions called for registering a service called eProjectNotificationService. Along with registering the service, there is a eProjectNotificationService.exe.config file where you setup your SMTP server...
0
1576
by: jocbor | last post by:
Hi! We are calling a webservice in a third party application for integration purposes. The scenario is that messages arrive on msmq. We have a windows service (using a domain account) receiving the messages and calls the webservice (using integrated security). The symptom we see is that if many messages arrive at the same time the
10
9750
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and entering the username and password manually, the wsdl is returned. So the username and password should be ok. I'm using this code: Merchant myMerch = new Merchant();...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2347
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.