System.Net.WebException making web service calls about 10% of the time.

Discussion in 'ASP .Net Web Services' started by Chris Langston, Aug 9, 2004.

  1. We are seeing a very frustrating intermittent problem. We are making
    Synchronious web service method calls from a .NET windows Service using the
    following syntax

    WebRequest.getResponse call it occasionally fails with the following error:

    1) Exception Information
    *********************************************
    Exception Type: System.Net.WebException
    Status: ConnectFailure
    Response: NULL
    Message: The underlying connection was closed: Unable to connect to the
    remote server.
    TargetSite: HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInfoResponse
    GetSoftwareUpdateInfo(HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInf
    oRequest)
    HelpLink: NULL
    Source: HorizonBoss.SoftwareUpdate.WSProxy

    StackTrace Information
    *********************************************
    at
    HorizonBoss.SoftwareUpdate.WSProxy.SoftwareUpdateProxy.GetSoftwareUpdateInfo
    (SoftwareInfoRequest requestInfo)
    at
    HorizonBoss.SoftwareUpdate.Components.ApplicationUpdateChecker.ApplicationUp
    dateChecker.AppUpdater_OnCheckForUpdate(Object sender, EventArgs e)
    This error occurs approximately 10% of the time. We are not using a proxy
    server.

    Any assistance would be great. We are using WSE 1.0 SP1 to encrypt and
    decrypt messages.

    The Remote Web Servers are running IIS 5.0 and IIS 6.0. The OS on the
    remote servers are Windows 2K or Windows 2003 Server. The Web Servers that
    we are calling into are taking a lot of request from many clients asking for
    information.

    There is no authentications on the remote web server as all requests are
    coming through as anonymous.



    Thanks

    Chris Langston
     
    Chris Langston, Aug 9, 2004
    #1
    1. Advertising

  2. Chris Langston

    Lucien Guest

    This doesn't look like a WSE specific issue and therefore I would post this
    also in ASPNET/ASMX discussion groups (or contact tech support).

    It's difficult to tell what's causing this but you may want to check the
    server timeout setting and try to increase it and see if that changes
    anything. Also check you're not running out of connections.

    "Chris Langston" <> wrote in message
    news:...
    >
    >
    > We are seeing a very frustrating intermittent problem. We are making
    > Synchronious web service method calls from a .NET windows Service using

    the
    > following syntax
    >
    > WebRequest.getResponse call it occasionally fails with the following

    error:
    >
    > 1) Exception Information
    > *********************************************
    > Exception Type: System.Net.WebException
    > Status: ConnectFailure
    > Response: NULL
    > Message: The underlying connection was closed: Unable to connect to the
    > remote server.
    > TargetSite:

    HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInfoResponse
    >

    GetSoftwareUpdateInfo(HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInf
    > oRequest)
    > HelpLink: NULL
    > Source: HorizonBoss.SoftwareUpdate.WSProxy
    >
    > StackTrace Information
    > *********************************************
    > at
    >

    HorizonBoss.SoftwareUpdate.WSProxy.SoftwareUpdateProxy.GetSoftwareUpdateInfo
    > (SoftwareInfoRequest requestInfo)
    > at
    >

    HorizonBoss.SoftwareUpdate.Components.ApplicationUpdateChecker.ApplicationUp
    > dateChecker.AppUpdater_OnCheckForUpdate(Object sender, EventArgs e)
    > This error occurs approximately 10% of the time. We are not using a proxy
    > server.
    >
    > Any assistance would be great. We are using WSE 1.0 SP1 to encrypt and
    > decrypt messages.
    >
    > The Remote Web Servers are running IIS 5.0 and IIS 6.0. The OS on the
    > remote servers are Windows 2K or Windows 2003 Server. The Web Servers

    that
    > we are calling into are taking a lot of request from many clients asking

    for
    > information.
    >
    > There is no authentications on the remote web server as all requests are
    > coming through as anonymous.
    >
    >
    >
    > Thanks
    >
    > Chris Langston
    >
    >
     
    Lucien, Aug 9, 2004
    #2
    1. Advertising

  3. Chris Langston

    Trebek Guest

    Based on looking at the exception and your figure of 10%, I would guess it
    has to has to do with the 'keep-alives'. In a non-WSE service, it is very
    simple to override the 'GetWebRequest' method and set keep-alives to false
    thus never attempting to reuse a closed connection. With a WSE-generated
    proxy class, I *believe* this is still possible (never used it so I don't
    where you will need to override this method).

    Try this out and see if it fixes your problem.

    HTH,
    Alex


    "Chris Langston" <> wrote in message
    news:...
    >
    >
    > We are seeing a very frustrating intermittent problem. We are making
    > Synchronious web service method calls from a .NET windows Service using

    the
    > following syntax
    >
    > WebRequest.getResponse call it occasionally fails with the following

    error:
    >
    > 1) Exception Information
    > *********************************************
    > Exception Type: System.Net.WebException
    > Status: ConnectFailure
    > Response: NULL
    > Message: The underlying connection was closed: Unable to connect to the
    > remote server.
    > TargetSite:

    HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInfoResponse
    >

    GetSoftwareUpdateInfo(HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInf
    > oRequest)
    > HelpLink: NULL
    > Source: HorizonBoss.SoftwareUpdate.WSProxy
    >
    > StackTrace Information
    > *********************************************
    > at
    >

    HorizonBoss.SoftwareUpdate.WSProxy.SoftwareUpdateProxy.GetSoftwareUpdateInfo
    > (SoftwareInfoRequest requestInfo)
    > at
    >

    HorizonBoss.SoftwareUpdate.Components.ApplicationUpdateChecker.ApplicationUp
    > dateChecker.AppUpdater_OnCheckForUpdate(Object sender, EventArgs e)
    > This error occurs approximately 10% of the time. We are not using a proxy
    > server.
    >
    > Any assistance would be great. We are using WSE 1.0 SP1 to encrypt and
    > decrypt messages.
    >
    > The Remote Web Servers are running IIS 5.0 and IIS 6.0. The OS on the
    > remote servers are Windows 2K or Windows 2003 Server. The Web Servers

    that
    > we are calling into are taking a lot of request from many clients asking

    for
    > information.
    >
    > There is no authentications on the remote web server as all requests are
    > coming through as anonymous.
    >
    >
    >
    > Thanks
    >
    > Chris Langston
    >
    >
     
    Trebek, Aug 9, 2004
    #3
  4. Can you tell me if you are using Windows Integrated Authentication on the
    webservice (i.e the server side) ?

    If so, you might be running out of wildcard ports on your client, and there
    are some settings you can tweak to alleviate this problem

    feroze
    ============
    this posting is provided as-is.
    ============

    "Trebek" <> wrote in message
    news:9KSRc.27579$...
    > Based on looking at the exception and your figure of 10%, I would guess it
    > has to has to do with the 'keep-alives'. In a non-WSE service, it is very
    > simple to override the 'GetWebRequest' method and set keep-alives to false
    > thus never attempting to reuse a closed connection. With a WSE-generated
    > proxy class, I *believe* this is still possible (never used it so I don't
    > where you will need to override this method).
    >
    > Try this out and see if it fixes your problem.
    >
    > HTH,
    > Alex
    >
    >
    > "Chris Langston" <> wrote in message
    > news:...
    > >
    > >
    > > We are seeing a very frustrating intermittent problem. We are making
    > > Synchronious web service method calls from a .NET windows Service using

    > the
    > > following syntax
    > >
    > > WebRequest.getResponse call it occasionally fails with the following

    > error:
    > >
    > > 1) Exception Information
    > > *********************************************
    > > Exception Type: System.Net.WebException
    > > Status: ConnectFailure
    > > Response: NULL
    > > Message: The underlying connection was closed: Unable to connect to the
    > > remote server.
    > > TargetSite:

    > HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInfoResponse
    > >

    >

    GetSoftwareUpdateInfo(HorizonBoss.SoftwareUpdate.BusinessObjects.SoftwareInf
    > > oRequest)
    > > HelpLink: NULL
    > > Source: HorizonBoss.SoftwareUpdate.WSProxy
    > >
    > > StackTrace Information
    > > *********************************************
    > > at
    > >

    >

    HorizonBoss.SoftwareUpdate.WSProxy.SoftwareUpdateProxy.GetSoftwareUpdateInfo
    > > (SoftwareInfoRequest requestInfo)
    > > at
    > >

    >

    HorizonBoss.SoftwareUpdate.Components.ApplicationUpdateChecker.ApplicationUp
    > > dateChecker.AppUpdater_OnCheckForUpdate(Object sender, EventArgs e)
    > > This error occurs approximately 10% of the time. We are not using a

    proxy
    > > server.
    > >
    > > Any assistance would be great. We are using WSE 1.0 SP1 to encrypt and
    > > decrypt messages.
    > >
    > > The Remote Web Servers are running IIS 5.0 and IIS 6.0. The OS on the
    > > remote servers are Windows 2K or Windows 2003 Server. The Web Servers

    > that
    > > we are calling into are taking a lot of request from many clients asking

    > for
    > > information.
    > >
    > > There is no authentications on the remote web server as all requests are
    > > coming through as anonymous.
    > >
    > >
    > >
    > > Thanks
    > >
    > > Chris Langston
    > >
    > >

    >
    >
    >
     
    Feroze [msft], Sep 2, 2004
    #4
  5. Feroze,

    This is the setting in our web.config file.

    <authentication mode="Windows" />
    <authorization>
    <allow users="*" />
    </authorization>

    On IIS when we setup the Web Service, we are allowing Anonymous
    connection. I guess that is the question that you are asking?


    Chris Langston


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Chris Langston, Sep 7, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Isaias Formacio Serna

    Web Service that calls an external Web Service

    Isaias Formacio Serna, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    5
    Views:
    250
  2. Replies:
    1
    Views:
    237
    Joe Kaplan \(MVP - ADSI\)
    Jun 14, 2006
  3. Lisa Ngo
    Replies:
    3
    Views:
    456
    Jan Tielens
    Jan 18, 2004
  4. Mark

    WebException while calling Web Service over HTTPS...

    Mark, Sep 1, 2004, in forum: ASP .Net Web Services
    Replies:
    14
    Views:
    286
  5. Multiple web service calls from web service

    , Jan 5, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    182
    Rodrigo García
    Jan 9, 2006
Loading...

Share This Page