Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / March 2007

Tip: Looking for answers? Try searching our database.

Send a word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lil J - 19 Mar 2007 09:36 GMT
how can I send a word document over remoting from a client to a server?
i think, i have to stream the file, but i don't know how, and
how to put this stream together on the client

thanks,
Mahesh Deo - 20 Mar 2007 13:25 GMT
If you want t otransfer word file over remoting there are two methods
1>transfer it byte by byte or 2>use file stream

if you want to transfer filestream you need to import System.IO namespace

Imports System.IO or in C# using System.IO following code is in c#

then create object of filestream

FileStrem s=new FileStram(@"d:\somelocation\WordFile.Doc",FileMode.Open)

this will give you filestream object which you can pass as it is over remoting

and on the other end you need to recounstruct wordfile as follows

declare on byte arry then read all bytes from your stream class into this
byte arry and save that byte arry to disk using File class and use,
File.WriteAllBytes(@"D:\MaheshDeo\pic\Mahesh1.doc", bytearry)

Byte[] b=new Byte[Stream.length];

for(inti=0;i<=Stream.lnegth;i++)
{
  b[i]=Stream.readByte();
}

File.saveAllBytes(@"d:\SomeLocation\MyWordFile.doc",b);
Signature

Mahesh A Deo, MCP

> how can I send a word document over remoting from a client to a server?
> i think, i have to stream the file, but i don't know how, and
> how to put this stream together on the client
>
> thanks,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.