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

C

Chris Langston

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
 
L

Lucien

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.
 
T

Trebek

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
 
F

Feroze [msft]

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.
============
 
C

Chris Langston

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
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top