I can call a third-party web service from a Windows forms program just fine. When I try to call the same web service and web method and the same URL from the WCF web service, I get the following error:
ExportValuationPolicyNumber:Exception=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 66.77.241.76:80 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 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 TFBIC.RCT.WCFWebServices.ExpressLync.ValuationServiceWse.ExportValuationPolicyNumber(String PolicyNumber) in c:\Source\TFBIC.RCT.WCFWebServices\TFBIC.RCT.WCFWebServices\Web References\ExpressLync\Reference.cs:line 519 at TFBIC.RCT.WCFWebServices.ValuationService.ExportValuationPolicyNumber(String PolicyNumber) in c:\Source\TFBIC.RCT.WCFWebServices\TFBIC.RCT.WCFWebServices\ValuationService.svc.cs:line 97
I am basically trying to write a WCF wrapper for a .asmx / WSE3 provider. Let it not go away, but Microsoft says that WCF can call WSE3, but only with SSL enabled, and my provider - believe it or not - does not allow SSL connections. So I started writing a wrapper so that I could call from BizTalk 2009. Now I'm testing the shell through a console program.
What can I do for debugging? I added EventLog traces before and after the WCF service, where it calls the .asmx service, so I know where it blows (plus the line number in the above error).
In my web.config there is the following:
<microsoft.web.services3> <diagnostics> <trace enabled="true" input="c:\inetpub\wwwroot\wsetraces\InputTrace.webinfo" output="c:\inetpub\wwwroot\wsetraces\OutputTrace.webinfo" /> <detailedErrors enabled="true" /> </diagnostics> </microsoft.web.services3>
and I gave the directory full access to everyone, but no traces appear.
What are some things I can find, or try debugging this again?
In theory, ping results should not matter because the website is running a Windows form program that calls it just great.
Nonetheless, this is what Ping shows, and it looks a bit dubious to me:
C: \ Users \ uxnxw01> ping rct.msbexpress.net
Pinging rct.msbexpress.net [66.77.241.56] with 32 bytes of data: Reply from 10.193.99.5: Destination net unreachable. Reply from 10.193.99.5: Destination net unreachable. Request timed out. Reply from 10.193.99.5: Destination net unreachable. Ping statistics for 66.77.241.56: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Thanks,
Neal Walters
WireShark Analysis
I launched Wireshark - in the comments were some results. However, after reading it more, he does not always say "Destination Unreachable". But in case it doesn't work, I never get any database. I am still confused what to do next. I was comparing packages, but it was slow and confusing. For example, I still have not found the key (specific policyNum) that I pass in the request packet. I also see several expressions of “Unavailable destinations” in what worked.
In what works, I never see 66.77.241.76, I only see the proxy server of our company. But I do not see anything in the config (or code) that would tell WSE3 to use or not use a proxy.
Telnet Results:
C:\Users\uxnxw01>telnet 66.77.241.56 80 Connecting To 66.77.241.56...Could not open connection to the host, on port 80: Connect failed C:\Users\uxnxw01>telnet 66.77.241.76 80 Connecting To 66.77.241.76...Could not open connection to the host, on port 80: Connect failed
I am not sure what this proves. As I said, I can definitely call the same web service from a Windows form by directly calling its WSE3 interface. I know that I can get there.
I think that the main differences in the two programs are that it works under the Win-form and directly calls WSE3. It works. The one that fails basically makes up 99% of the same code that is published as a WCF service, so it runs on IIS (then the console program calls the WCF / IIS service on my machine, which in turn calls the WSE3 service).
Is there any reason IIS will not use the same proxy?