opening the file with remoting

  • Thread starter Thread starter Vinki
  • Start date Start date
V

Vinki

Hello Everyone,

I need to open a text file with .net remoting. This text file resides on
another server. My server program running on the server has this method that
opens the text file
System.Diagnostics.Process.Start(filePath);
My client program has a button which I click and it call the server
program method that opens the file. When I click the button, the file opens
on the server itself, is it possible that I can see that file opening on the
client.

Please let me know.

Thanks
 
Vinki said:
I need to open a text file with .net remoting. This text file resides on
another server. My server program running on the server has this method
that
opens the text file
System.Diagnostics.Process.Start(filePath);
My client program has a button which I click and it call the server
program method that opens the file. When I click the button, the file
opens
on the server itself, is it possible that I can see that file opening on
the
client.

What you are expressing is not entirely accurate.
Process.Start(filePath), where filePath points to a text file, does not
"open the file". What it does is that it launches the default program that
is associated with the text files (typically Notepad.exe), and that program
opens the file.
If you want that operation to occur at the client, you need to launch
the program (Notepad) at the client, so you have to execute a
"Process.Start" at the client side. Of course, that program that you are
launching at the client will need access to the text file that it has to
open. I assume that the file is not shared accross the network, because in
that case you would not need to use Remoting. If the file cannot be shared,
you can use your remoting code to open the file at the server (with a
StreamReader), send the content back to the client, write the file to a
temporary location at the client, and then launch the program that opens the
file on the client side against this temporary file.
 

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

Back
Top