S
Steve
Hi All
I have a windows forms application in VB.net 2008
My app can send SMS appt reminders via an SMS website
One of the first tasks is to read their account balance with the SMS company
as it is works on prepaid credits only
When I try to connect using the following code at the GetResponse call there
is no timeout happening after 5 Seconds if the web site is unreachable
It takes approx 30 seconds before the method call returns with connection
timed out
My understanding is the WebRequest.Timeout property should cause the method
call to abort after 5 seconds if no response has been received
Partial Code....---------------------------
Dim url As String =
"http://www.smsglobal.com.au/http-api.php?action=balancesms&user=" &
globalsmsuser & "&password=" & globalsmspwd
myWebRequest = Net.WebRequest.Create(url)
myWebRequest.Timeout = 5000
myWebRequest.Credentials = Net.CredentialCache.DefaultCredentials
myWebResponse = myWebRequest.GetResponse() ***************** hangs here
----------------------------------------------------------------------------
Am I doing something wrong?
Regards
Steve
I have a windows forms application in VB.net 2008
My app can send SMS appt reminders via an SMS website
One of the first tasks is to read their account balance with the SMS company
as it is works on prepaid credits only
When I try to connect using the following code at the GetResponse call there
is no timeout happening after 5 Seconds if the web site is unreachable
It takes approx 30 seconds before the method call returns with connection
timed out
My understanding is the WebRequest.Timeout property should cause the method
call to abort after 5 seconds if no response has been received
Partial Code....---------------------------
Dim url As String =
"http://www.smsglobal.com.au/http-api.php?action=balancesms&user=" &
globalsmsuser & "&password=" & globalsmspwd
myWebRequest = Net.WebRequest.Create(url)
myWebRequest.Timeout = 5000
myWebRequest.Credentials = Net.CredentialCache.DefaultCredentials
myWebResponse = myWebRequest.GetResponse() ***************** hangs here
----------------------------------------------------------------------------
Am I doing something wrong?
Regards
Steve