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

Automating an upload of data

Hi,

I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?

The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.

Thanks!
Feb 5 '07 #1
6 1397
"Adrian Jones" <Ad*********@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?
Well, any time you need to check for something on a regular basis and carry
out some processing based on the results of that check without user
intervention, a Windows service is almost always the right solution.
However, I'm assuming from the fact that you mention your ISP's servers,
that you're not able to deploy a Windows service on them...?

The "problem" with ASP.NET of course, in this particular instance, is that
your web app will stop when the last session terminates... This makes it
difficult to guarantee that your process will run 24/7. There are ways and
means to get round this, but these are hacks at best...

You mention that this regular check involves FTP - therefore, does it
actually need to be done through ASP.NET at all...? If you can access the
FTP site from outside your ASP.NET app, wouldn't it be easier to write a
Windows service and deploy it on another machine...?
The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.
If your ISP supports MySQL v5.1.6 or later, you can simply create an event:
http://dev.mysql.com/tech-resources/...t-feature.html
Feb 5 '07 #2
Doesn't look like a good task for asp.net. Asp.net is a technology for
building web pages in response to client requests. In your case, who needs a
web page? Who is the client for asp.net? What are the advantages of doing it
in asp.net as opposed to a regular windows scheduled task or a windows
service?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Adrian Jones" <Ad*********@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
Hi,

I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?

The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.

Thanks!

Feb 5 '07 #3
asp isn't suited to such a task as asp code only runs when the page is
requested. Typically you'd use a service for this, or if you have control
over some other machine then that machine would run a scheduled task to
request a page on your web server that checks the folder.

"Adrian Jones" <Ad*********@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
Hi,

I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?

The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.

Thanks!

Feb 5 '07 #4
I think what I really meant to say was, which of the technologies available
to me will help me automate this.

Looks like the MySQL events option, or a web service are the ways to go.

I'll have to find out if our ISP allows a web service.

Thanks to all for your speedy help!
Feb 5 '07 #5
Hi Adrian,

You can easily write a script (well, it needs 2 actually) to interrogate the
ftp folder, and upload the file to your local computer, and then run the
routine on it.

The first script fires an ftp session, the second script does the upload.

Once created, set a Scheduled Task to call it as often as you require.

I do this every night and then process the data locally with VB, but the app
can be of your choosing.

NEIL
"Adrian Jones" <Ad*********@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
Hi,

I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.

Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?

The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.

Thanks!

Feb 23 '07 #6
On Feb 23, 9:56 am, "Neil" <n...@NOSPAMPLEASE.euwrote:
Hi Adrian,

You can easily write a script (well, it needs 2 actually) to interrogate the
ftp folder, and upload the file to your local computer, and then run the
routine on it.

The first script fires an ftp session, the second script does the upload.

Once created, set a Scheduled Task to call it as often as you require.

I do this every night and then process the data locally with VB, but the app
can be of your choosing.

NEIL

"Adrian Jones" <AdrianJo...@discussions.microsoft.comwrote in message

news:FF**********************************@microsof t.com...
Hi,
I need to regularly check an FTP folder for the presence of a file, and if
found, run a routine.
Given that this is all on our ISP's servers, what is the best way to
automate such a routine in ASP.NET?
The end target of the routine is likely to be a MySQL database. If we were
using SQL Server, I assume I could use DTS to trigger the process, but I'm
fairly ignorant of MySQL.
Thanks!- Hide quoted text -

- Show quoted text -
As I understand it, there is no need for any FTP actions. ASP.NET
needs to check if the file is in the local directory and if the file
is there, open it and import to the database. I'm right? So, if the
source file is small I don't see any problem to implement such
function - schedule aspx, depends on input format open the file and
make a connection to MySQL, import your data. That's all :-)

Feb 23 '07 #7

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

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
6
by: Charles Banas | last post by:
weird subject - i hope more than just one curious regular will hear me out. :) ok, i've got a bit of a big problem, and i need answers as soon as possible. i know this forum is meant for web...
6
by: Mark Gross | last post by:
I am attempting to programatically drive a Lotus Notes web application from a VB.NET database application (who wants to rekey information in one database into someone else's web page for entry to...
4
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
0
by: SEMIH DEMIR | last post by:
Sitelerden birinde verilen yabancı kaynakli bir scriptti duzenledim yanlız birseyin içinden bir turlu cıkamadım işin aslı ilk defa persistin upload componentini kullanacam yanlız suanki haliyle...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
9
by: 8anos | last post by:
Hello, I am new at the community and newbie at programming :) As you may know rapidshare provides a perl script for linux, to upload files at their servers. You can find the original scripts at...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
0
by: hsarin | last post by:
Hello Friends, I have a docushare link where i need to upload a file on daily basis. Is there any way i can automate this process. Using docushare windows client i have mapped it on my windows...
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
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,...

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.