I want to write the contents of one docx file to another using "FILESTREAM AND STREAM" OBJECT
Here is my code
HttpWebResponse r = (HttpWebResponse)w.GetResponse();
Stream objStream = r.GetResponseStream();
using (FileStream objStr = new FileStream(@"E:\downloads\test.docx", FileMode.Create))
{
Stream str = r.GetResponseStream();
if (str != null)
{
byte[] read = new byte[256];
long count = str.Read(read, 0, 256);
while (count > 0)
{
objStr.Write(read, 0, Convert.ToInt32(count));
count = str.Read(read, 0, 256);
}
}
str.close();
}
Loading
Sibeesh VenuPosted Apr 29, 2015, 5:40 AM
Please try the below link.
http://stackoverflow.com/questions/11161516/the-request-was-aborted-the-connection-was-closed-unexpectedly
http://stackoverflow.com/questions/17844929/exceptionthe-request-was-aborted-the-connection-was-closed-unexpectedly-when
Please up vote and accept if it helps you.
Kindest Regards
Sibeesh Venu
www.sibeeshpassion.com
Raghavendra JoshiPosted Apr 28, 2015, 7:11 AM
Sibeesh VenuPosted Apr 28, 2015, 4:32 AM
So is that working? Are you getting any errors ? Please explain your question, In the meanwhile you can check the below link.
http://www.codeproject.com/Articles/660478/Csharp-Create-and-Manipulate-Word-Documents-Progra
Please up vote and accept if it helps you.
Kindest Regards
Sibeesh Venu
www.sibeeshpassion.com