473,394 Members | 1,761 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,394 software developers and data experts.

async ftp timer issue.

I am try to download some files from an ftp site asynchronously. I have it
on a timer, but if the file gets held up, the timer might cut it off. I need
a way to pause the timer and still run the next line of code. Then pick up
the timer after it has downloaded. Here is what I am trying, but this does
not work.....

public void StartTimer()
{
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Interval =
Convert.ToDouble(ConfigurationSettings.AppSettings["Interval"]);
myTimer.Elapsed += new
System.Timers.ElapsedEventHandler(this.myTimer_Ela psed);
myTimer.Enabled = true;
}
protected void myTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs
e)
{
timer.Stop(); ************************* I need to pause the timer, but
still run the SeekFiles function
SeekFiles();
timer.Start(); ******************** Then I need it to start the timer
again??????
} // end function


--

Dave
Nov 16 '05 #1
0 1299

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

Similar topics

6
by: Vanessa | last post by:
I have a question regarding async mode for calling Microsoft.XMLHTTP object. Microsoft.XMLHTTP hangs the IE once in a while suddenly, but it will work again after half an hour or so without doing...
0
by: Steve Terepin | last post by:
I'm doing an asynchronous 'read' operation on a file, and I want to abort the operation if it hasn't completed within a certain time (it's a DVD I'm reading from, and occasionally the sectors are...
0
by: DaveF | last post by:
I am try to download some files from an ftp site asynchronously. I have it on a timer, but if the file gets held up, the timer might cut it off. I need a way to pause the timer and still run the...
1
by: Mark Smith | last post by:
Hi , Is it possible in .Net to define a async timer callback. What I am wanting to do is declare a time-out condition that gets executed should the something timeout. The reason I want to do...
1
by: Jeff Weber | last post by:
First, my question: Should I use Write or BeginWrite (sync or async) to stream data to my clients. Details: On the server I have a custom circular data buffer that receives byte array data...
2
by: Viet | last post by:
I have a couple of questions that hopefully someone could clarify for me. I have an app that uses the threading.timer to constantly poll a scanner to scan in documents. I understand that Async...
13
by: Dog Ears | last post by:
I've got a windows form that monitors the status of employees it polls a database every 2 seconds to fetch updates then update a underlying dataset bound to a grid using Invoke to marshal to the...
2
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm using an async page to kick off a couple of asynchronous web services using the PageAsyncTask class. I'm also testing a progress bar that uses an Ajax UpdatePanel and Timer control to...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
10
by: ColoradoGeiger | last post by:
I have a fairly standard server application that I am using asynchronous socket calls to make connections, send and receive data, and all of that jazz. No blocking methods was my goal in writing...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.