views:

237

answers:

1

Hello all,

I have an XML web service running on my Windows 2003 server. I have a windows service running on the same machine. I want to call the XML web service from the windows service.

This works fine on my development machine, which is running Windows XP. However, when I try to do this on my Windows Server 2003 box, it times out and throws an exception. My windows service catches the exception and writes it to the eventlog. This is how the error shows up in the event log :

The description for Event ID ( 0 ) in Source ( myWS ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Exception in MyWS service : [System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [MY IP ADDRESS HERE] at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at TesterClient.Test() in C:\Projects\Odyl\OdylUtilities\MyWS\TesterClient.cs:line 30 at MyWS.MyWSWindowsService.DoMyWSService() in C:\Projects\Odyl\OdylUtilities\MyWS\MyWSWindowsService.cs:line 81 at MyWS.MyWSWindowsService.StartService() in C:\Projects\Odyl\OdylUtilities\MyWS\MyWSWindowsService.cs:line 45].

As you can see, it has some problem with writing to the eventlog (all that AUXSOURCE stuff), but the main problem is that it's getting a timeout error from the web service.

Here's the truly odd thing, though -- from my dev box (running XP), I can call the web service that's running on my Windows 2003 Server box. This is really perplexing -- obviously the web service is working fine, but for some reason, Windows Server 2003 will not let you call a web service from the same machine!

Can anybody please give me a hint as to what's going on?

A: 

This sounds like a networking issue related to your Win2K3 server. The network configuration is preventing it from accessing the service url at the given location.

Easiest way to troubleshoot this: RDP to the Win2K3 Server desktop and open up a web browser to connect to the web service. I expect you will get a timeout.

Easiest way to remedy this: if there is a URL to the service that works locally, i.e. localhost, try that from your service. Otherwise, be prepared to get your network administrator involved to understand the DNS settings necessary to support the URL path you want to use for your service.

jro
Interesting.... Yes, I did try to navigate to the webservice address from that machine, and indeed I got a timeout error. This may indeed be a server issue. If I wanted to post this over at serverfault, would I get in trouble for cross-posting?
Not sure if this would count for cross-posting.
jro
Alright, well, I'll probably leave this up here for a few more days to see if I get any more responses. If I don't, I'll just delete it and post it over to ServerFault. That shouldn't break any rules, I don't think.