WCF Tracing showing "Socket Connection Aborted" warning
-
I'm in the process of investigating some random timeout exceptions on the client side when trying to connect to the service (possibly a network issue, possible a future question here). I'm not able to reproduce that error, but I in the process of tracking it down I did turn on WCF Tracing in our test environment to see what it showed on the server side, and to my surprise it showed a bunch of "Socket Connection Aborted" warnings, I think one for each call to the service. My code to call the service looks like this:
var proxy = ServiceFactory.GetPolicyAdminWCF();
try
{
var returnValue = proxy.GetClaimDetail(ClaimID);
proxy.Close();
return returnValue;
}
catch
{
proxy.Abort();
throw;
}With the call to GetPolicyAdminWCF looking like this:
internal static PAWcf.PolicyAdminWCFClient GetPolicyAdminWCF()
{
string configName = Ability.CAPS.Config.Settings.PolicyAdminConfigName;
string serviceAddress = Ability.CAPS.Config.Settings.PolicyAdminSvcURL;
var proxy = new PAWcf.PolicyAdminWCFClient(configName, serviceAddress);return proxy;
}
The client doesn't experience any problems, but I would think that if I'm doing everything right I would not be getting this warning on the server. Any ideas what could be causing this? Could a buildup of these warning eventually cause a random timeout from the client later?
-
I'm in the process of investigating some random timeout exceptions on the client side when trying to connect to the service (possibly a network issue, possible a future question here). I'm not able to reproduce that error, but I in the process of tracking it down I did turn on WCF Tracing in our test environment to see what it showed on the server side, and to my surprise it showed a bunch of "Socket Connection Aborted" warnings, I think one for each call to the service. My code to call the service looks like this:
var proxy = ServiceFactory.GetPolicyAdminWCF();
try
{
var returnValue = proxy.GetClaimDetail(ClaimID);
proxy.Close();
return returnValue;
}
catch
{
proxy.Abort();
throw;
}With the call to GetPolicyAdminWCF looking like this:
internal static PAWcf.PolicyAdminWCFClient GetPolicyAdminWCF()
{
string configName = Ability.CAPS.Config.Settings.PolicyAdminConfigName;
string serviceAddress = Ability.CAPS.Config.Settings.PolicyAdminSvcURL;
var proxy = new PAWcf.PolicyAdminWCFClient(configName, serviceAddress);return proxy;
}
The client doesn't experience any problems, but I would think that if I'm doing everything right I would not be getting this warning on the server. Any ideas what could be causing this? Could a buildup of these warning eventually cause a random timeout from the client later?
-
We're not actually hitting that code. The code on the client executes successfully (no exceptions are raised), so it just runs what's in the try
var returnValue = proxy.GetClaimDetail(ClaimID);
proxy.Close();
return returnValue;I included the catch code just to show that I am closing and/or aborting every connection. But when tracing the service on the server side I am seeing the socket abort messages.
-
We're not actually hitting that code. The code on the client executes successfully (no exceptions are raised), so it just runs what's in the try
var returnValue = proxy.GetClaimDetail(ClaimID);
proxy.Close();
return returnValue;I included the catch code just to show that I am closing and/or aborting every connection. But when tracing the service on the server side I am seeing the socket abort messages.
-
I am saying that you disable the try{} Catch{}. So that you get the exact error. May be it is not getting endpoint. According to your code the operation will abort. Debug again and reload.
I really think you're missing the part about there being no exception thrown and that code is executing successfully, but I'm willing to try anything so I did remove the try catch code from around the call to the service and the same thing happened. The code runs successfully, no exceptions are thrown on the client or the server, but when I turn on WCF tracing in the Web.Config like so:
I see a Warning level message in the logs with the description SocketConnection aborted.
-
I really think you're missing the part about there being no exception thrown and that code is executing successfully, but I'm willing to try anything so I did remove the try catch code from around the call to the service and the same thing happened. The code runs successfully, no exceptions are thrown on the client or the server, but when I turn on WCF tracing in the Web.Config like so:
I see a Warning level message in the logs with the description SocketConnection aborted.