Hi Chris,
I have write this piece of code to my sremoting object, that is in ther
server and the file is also in the server;
----------------------------------------------------------------------------
----------------------------------
public string fileContent()
{
string
localfilepath="C:\\Subjects\\DOT\\CSharpProjects\\DataAccess\\tutorial2.mdb"
;
StreamReader r = new StreamReader ((System.IO.Stream)
File.OpenRead(localfilepath));
string con=r.ReadToEnd();
r.Close();
return con;
}
----------------------------------------------------------------------------
-----------------------------------
And my client also access that remote object and get the string and write to
local file by following method
----------------------------------------------------------------------------
----------------------------------
public void writeFile(string con)
{
string
localfilepath="D:\\Subjects\\DOT\\CSharpProjects\\DataAccess\\tute.mdb";
StreamWriter r = new StreamWriter((System.IO.Stream)
File.OpenWrite(localfilepath));
r.Write(con);
r.Close();
}
----------------------------------------------------------------------------
---------------------------------
But it can copy the file but it becomes corrupted.
Can you pls tell me where am i making mistake .
Thanks