Problem in reading FileStream from remoting server?
I am working on windows application using C#.Net 2005
Here I have created two application one is remoting server and other is remoting client.
Both applications run on separate computers.
I want to download one file from server. So I made a api which returns FileStream.
Client reads this FileStream and write it in another new file.
This thing works fine when both computers are in LAN.
But when these softwares are connected via internet i.e. separate networks then server returns this FileStream but client client could not read it. I receive remoting connection timeout at client side when it tries to read the file from server.
As when I try to read this FileStream then I get error -
Cannot obtain fields or call methods on the instance of type 'System.IO.FileStream' because it is a proxy to a remote object.
But I did not get this error on LAN.
Is there any alternate solution to download file from remoting server