K
Karl
Hi,
I'm accessing an ASP.NET webservice from within a vb.net rich client
application.
All goes perfectly when there is an available internet connection (the
app connects and all works as expected)or if the machine is standalone
and has no access to the web (the app cannot connect at all so tries
for a second or two then gives up and carries on).
The problem I have is with machines that are based on a LAN with no
internet connectivity. The line of code that connects to the
webservice sits there for at least a minute before realising that it
cannot connect and moving on.
I have a couple of questions:
1) How can I set a timeout on the webservice call to force it to give
up after a specified time? (I've tried setting the timeout property in
the webreference but it has made no difference)
2) Is there a quick check that can be run against a webservice to see
if it is available before trying to access it?
3) is there an easy way to check whether a client machine has web
access?? (I've tried creating an HTTPRequest, firing it at a popular
website and checking the response to see if it connected but this
hangs for the same period as the web service on a machine without a
connection!!)
This is the line that is causing problems:
Dim results() as object = me.invoke("GetCurrentVersion", new
object(-1){})
Any help will be greatly appreciated..!!!
thanks
Karl
I'm accessing an ASP.NET webservice from within a vb.net rich client
application.
All goes perfectly when there is an available internet connection (the
app connects and all works as expected)or if the machine is standalone
and has no access to the web (the app cannot connect at all so tries
for a second or two then gives up and carries on).
The problem I have is with machines that are based on a LAN with no
internet connectivity. The line of code that connects to the
webservice sits there for at least a minute before realising that it
cannot connect and moving on.
I have a couple of questions:
1) How can I set a timeout on the webservice call to force it to give
up after a specified time? (I've tried setting the timeout property in
the webreference but it has made no difference)
2) Is there a quick check that can be run against a webservice to see
if it is available before trying to access it?
3) is there an easy way to check whether a client machine has web
access?? (I've tried creating an HTTPRequest, firing it at a popular
website and checking the response to see if it connected but this
hangs for the same period as the web service on a machine without a
connection!!)
This is the line that is causing problems:
Dim results() as object = me.invoke("GetCurrentVersion", new
object(-1){})
Any help will be greatly appreciated..!!!
thanks
Karl