Monday, March 26, 2012

simple client-server program ?

Hi,
how do I develop the following 'simple' program using ASP.NET webforms :
a client has a text-file (aaa.txt) that has to be manipulated by code
located on the server, the server would then manipulate the content and send
the manipulated content back to the client, where the client saves it to
(bbb.txt)
What scenario would be best :
1) 1st scenario ("pull model") : the server using an url (given by the
client) that specifies the location of the file on the client and the server
would then download the file, manipulate it and send it back. but how '
what is the exact code to do this ? what classes do I use ? ...
or
2) 2nd scenario : the client sending the file to the server, the server
manipulating the file and sending it back to the client.
again how '
how do I 'send' a file to the other-side ? the client code may not be .NET
code I guess , right ? so how do I send a file to the other side ? in
Javascript then ? and how ?
an how do I save a file on the client in JavaScript ?
lots of questions I know.
any help greatly appreciated !!!
thnx
Chris2) is much better as there is no need to have a special configuration client
side wihtout talking about security.
You can upload a file awith the htmlInputFile control (that creates an Input
type=file HTML tag) and the download is done using :
http://support.microsoft.com/default.aspx?id=260519
Note that for security reasons, the user will specify what is the file to
upload (using the HTML control) and the article above will allow the user to
specify where the file should be stored...
Patrice
"Chris" <christianc@.pandora.be> a crit dans le message de
news:6jxbd.278459$qW5.14401634@.phobos.telenet-ops.be...
> Hi,
> how do I develop the following 'simple' program using ASP.NET webforms :
> a client has a text-file (aaa.txt) that has to be manipulated by code
> located on the server, the server would then manipulate the content and
send
> the manipulated content back to the client, where the client saves it to
> (bbb.txt)
> What scenario would be best :
> 1) 1st scenario ("pull model") : the server using an url (given by the
> client) that specifies the location of the file on the client and the
server
> would then download the file, manipulate it and send it back. but how '
> what is the exact code to do this ? what classes do I use ? ...
> or
> 2) 2nd scenario : the client sending the file to the server, the server
> manipulating the file and sending it back to the client.
> again how '
> how do I 'send' a file to the other-side ? the client code may not be .NET
> code I guess , right ? so how do I send a file to the other side ? in
> Javascript then ? and how ?
> an how do I save a file on the client in JavaScript ?
> lots of questions I know.
> any help greatly appreciated !!!
> thnx
> Chris
>
>

0 comments:

Post a Comment