Isolated Storage, XML File Upload

U

U.C.

Hello,

My client needs to collect data on a disconnected computer. I am
hoping I could store data in Isolated Storage as XML files and expose
later to a server (does anyone have experience with Isolated Storage)?


The solution I am looking for would be to have a connection string or
url in the config file and a button the user could push that would
automatically transfer files to server. The big caveat here is that I
do not get to lay my hands on the server so the server side
implementation would need to be manageable via limited development and
across several different server side implementations.

Is there some way I can automate a FTP service from the client side?
Does anyone have any other ideas?

Thanx Jim
 
S

sloan

First, I used (and contributed) to this
http://www.codeproject.com/cs/internet/ftplib.asp

You either need to create a Scheduled Task, OR a WindowsService. Scheduled
task is easier to implement of course.

You also don't want to upload files already uploaded.
Use the library above, and you can compare dates.
(if clientFile.date > serverFile.date)
{
// Upload the File!
}

...

The server can "watch" for files also:

FileSystemWatcher serviceWatcher = new FileSystemWatcher();
serviceWatcher.Path = "C:\uploadedFTPFiles";
// filter to watch only .DLL files
serviceWatcher.Filter = "*.dll";
// only handle changed, created, and deleted events
serviceWatcher.Changed += new FileSystemEventHandler(MyMethod);
serviceWatcher.Created += new FileSystemEventHandler(MyMethod);
serviceWatcher.Deleted += new FileSystemEventHandler(MyMethod);

this is just a snipplet, but might get you going.
 
U

U.C.

Thanx Sloan, looks like exactly what I am looking for.

A question about the Scheduled Task or WindowsService. I am not sure I
follow why I would need to create. My thoughts would be to provide the
user with an interface to select which files to upload (send from
client to server) and then push the play button. I am missing
something?
You either need to create a Scheduled Task, OR a WindowsService. Scheduled
task is easier to implement of course.

By the way thanx a lot.

Jim
 
S

sloan

If the client is manually uploading, the the client doesn't need anything.

If you want to server to "auto respond", then you'll have to create a
Windows Service (and the FileHandler code).

...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top