Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. WCF Tracing showing "Socket Connection Aborted" warning

WCF Tracing showing "Socket Connection Aborted" warning

Scheduled Pinned Locked Moved WCF and WF
sysadminhelpquestioncsharpwcf
6 Posts 2 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeremy Hutchinson
    wrote on last edited by
    #1

    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?

    F 1 Reply Last reply
    0
    • J Jeremy Hutchinson

      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?

      F Offline
      F Offline
      fingerss5
      wrote on last edited by
      #2

      REMOVE the statement catch { proxy.Abort(); throw; } then trace the exact error.

      J 1 Reply Last reply
      0
      • F fingerss5

        REMOVE the statement catch { proxy.Abort(); throw; } then trace the exact error.

        J Offline
        J Offline
        Jeremy Hutchinson
        wrote on last edited by
        #3

        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.

        F 1 Reply Last reply
        0
        • J Jeremy Hutchinson

          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.

          F Offline
          F Offline
          fingerss5
          wrote on last edited by
          #4

          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.

          J 1 Reply Last reply
          0
          • F fingerss5

            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.

            J Offline
            J Offline
            Jeremy Hutchinson
            wrote on last edited by
            #5

            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.

            F 1 Reply Last reply
            0
            • J Jeremy Hutchinson

              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.

              F Offline
              F Offline
              fingerss5
              wrote on last edited by
              #6

              True vs2011 should address this problem. Its a connectivity error keeps losing connection I don't know why. Might be a bug in vs2010. Mine takes time to reach server for the first time.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups