-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: GreatestMe1
Message 1 in Discussion

Hi all,


      My Application calls the webservice residing on WebServer to download a 
RTF file. WebService is returning a bytearray to my client application. Client 
Application(C#) then uses following code to write to file


                        System.IO.FileStream fs1=null;
                        System.IO.BinaryWriter bw1=null;
                                fs1=System.IO.File.Open(filePath, 
System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write);
                                bw1=new BinaryWriter(fs1);
                                
                                bw1.Write(myReport.FileImage);

The file is written successfully to specified location. It also opens with no 
problems with WordPad and NotePad. But when i try to open the RTF file either 
manually or by program using MS Word Application, it gives an error as "The 
Document name or path is not valid. Try these suggestions. Check the file 
permissions for the document or drive. Use the file open dialog box to locate 
the document. "

This Problem is only with RTF files. .Doc files open without any problem.

Please let me know if there is any solution for this problem. Is there anything 
wrong with the method i m using to write the file? should i use any other 
method? why the problem is only with RTF files? 

TM

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to