473,382 Members | 1,392 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,382 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 680

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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.