Skip to main content
Participant
February 28, 2008
Question

web service internet connection

  • February 28, 2008
  • 1 reply
  • 336 views
Hi

I am working on an intranet system that uses an external internet webservice. In order to connect to the external webservice i have to connect to the internet. When the internet connection goes down and i try to get data back from the webservice the page just hangs up as it is waiting on a reply from the webservice.

How can i test in coldfusion for the internet connection being up?

I hope you can point me in right direction.

Stewart
This topic has been closed for replies.

1 reply

Inspiring
February 28, 2008
<cftry>
<cfexecute name="ping.exe" timeout="10" arguments="-n 1 www.google.com" variable="isOnline" />
<cfdump var="#isOnline#">
<cfcatch>
<cfthrow message="ping process timed out" />
</cfcatch>
</cftry>