Good afternoon,
I am running into a curious problem with WCF and IntelliTrace. I have an application that I'm testing using a locally-hosted WCF endpoint (the development server built into VS2010) using the basicHttpBinding. The application has been running normally: no exceptions are are making their way to the app and all of the WCF calls are returning data.
On a lark, I decided to take a look at the IntelliTrace output and noticed that my first call to WCF throws two exceptiosn:
Exception:Thrown: "No connection could be made because the target machine actively refused it" (System.Net.Sockets.SocketException)
A System.Net.Sockets.SocketException was thrown: "No connection could be made because the target machine actively refused it"
Exception:Caught: "No connection could be made because the target machine actively refused it" (System.Net.Sockets.SocketException)
A System.Net.Sockets.SocketException was caught: "No connection could be made because the target machine actively refused it"
I've reduced the application to a trivial use case:
ServiceClient client = new ServiceClient();
string[] output = client.LegacyCheck("username");
Console.WriteLine(output[0]);
Console.WriteLine(client.GetData(65));
And I get the same behavior. The second call has no exception associated with it.
I'm very puzzled. If the connection is being refused, then why does the exception not make it up to the application? And why would it success after 2 failed tries?
Any help is appreciated!