473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

How to set a timeout

I have a windows application that is using a webservice to get some
information used in the program. However, when I use the program
behind a firewall, the program just hangs there, trying to access this
webservice all the time, without reaching it. How can i set a timeout
in my program that can make it stop trying to reach that webservice?

Try
rate = objExchange.getRate(strCountry1, strCountry2)
lblUpdate.Text = "Last updated: " & Date.Now
Catch ex As Exception
lblUpdate.Text = "Connection failed"
End Try
lblKurs.Text = rate
Anyone have any suggestions? Thank you in advance,
Hurley
Nov 20 '05 #1
6 1587
Hi Hurley,

Threading.thread.sleep(1000) ' is one second
This is the current thread

I hope this helps?

Cor
Nov 20 '05 #2
Hi Hurley,

Threading.thread.sleep(1000) ' is one second
This is the current thread

I hope this helps?

Cor
Nov 20 '05 #3

Thank you so much for your answer. Sorry to be a pain. But I'm pretty
new to VB and don't quit understand how to work with this thread class.
I tried to play around with it and to have a look in the MSDN library,
but I still can't figure out how to use this in my code. Any chance that
I can get an example or better description on how to use this?

Thank you again,
Hurley

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

Thank you so much for your answer. Sorry to be a pain. But I'm pretty
new to VB and don't quit understand how to work with this thread class.
I tried to play around with it and to have a look in the MSDN library,
but I still can't figure out how to use this in my code. Any chance that
I can get an example or better description on how to use this?

Thank you again,
Hurley

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
Hi,

You only have to put this in your code and your program will sleep on that
place

It is a kind of a wait

Cor
Nov 20 '05 #6
Hi,

You only have to put this in your code and your program will sleep on that
place

It is a kind of a wait

Cor
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places....
12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
2
by: Greg Decos | last post by:
I am using forms authentication using a FormsAuthenticationTickets set to expire in 30 minutes and the ticket is added to the collection of cookies. I am not sure where the following values are...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
22
by: Nick Craig-Wood | last post by:
Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded:...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
5
by: Masso | last post by:
Hallo to the group, my question is this: where i have to set timeout in a web application? If i set into sessionState with property Timeout="60", after 20 minutes the session is over. Always...
2
by: JimLad | last post by:
Hi, I've got a very basic asp.net page that accesses a very slow db query and siplays to screen. I'm hitting a timeout aftre about 3.5 to 4.5 minutes - seems to be variable. SQL connection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.