473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

problem downloading word documents

Hi,

We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on .NET 1.1, IIS 6,
Win2003.

Now we are having problem when trying to download word documents
located in the file server. It often says Internet Explorer cannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWord file, but most of the time we cannot open the document.

This is how I stream out the word contents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();

I was informed that we have excluded application/msword from the
compression list.

Any idea what else could cause the problem in downloading the word
document?

Thanks a lot.

Mar 27 '07 #1
6 3739
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
<cy*****@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi,

We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on .NET 1.1, IIS 6,
Win2003.

Now we are having problem when trying to download word documents
located in the file server. It often says Internet Explorer cannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWord file, but most of the time we cannot open the document.

This is how I stream out the word contents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();

I was informed that we have excluded application/msword from the
compression list.

Any idea what else could cause the problem in downloading the word
document?

Thanks a lot.

Mar 27 '07 #2
On Mar 27, 3:22 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin

<cyus...@gmail.comwrote in message

news:11**********************@p77g2000hsh.googlegr oups.com...
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on .NET 1.1, IIS 6,
Win2003.
Now we are having problem when trying to download word documents
located in the file server. It often says Internet Explorer cannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWord file, but most of the time we cannot open the document.
This is how I stream out the word contents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
I was informed that we have excluded application/msword from the
compression list.
Any idea what else could cause the problem in downloading the word
document?
Thanks a lot.- Hide quoted text -

- Show quoted text -
The file size is certainly not large. I've exprienced this problem
even when I tried to download a 51kb file. The file that we have has a
maximum of 4MB size limit.

Mar 27 '07 #3
On Mar 27, 11:09 am, cyus...@gmail.com wrote:
On Mar 27, 3:22 pm, "Eliyahu Goldin"

<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
<cyus...@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on .NET 1.1, IIS 6,
Win2003.
Now we are having problem when trying to download word documents
located in the file server. It often says Internet Explorer cannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWord file, but most of the time we cannot open the document.
This is how I stream out the word contents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
I was informed that we have excluded application/msword from the
compression list.
Any idea what else could cause the problem in downloading the word
document?
Thanks a lot.- Hide quoted text -
- Show quoted text -

The file size is certainly not large. I've exprienced this problem
even when I tried to download a 51kb file. The file that we have has a
maximum of 4MB size limit.- Hide quoted text -

- Show quoted text -
Try to follow the code of this article http://support.microsoft.com/kb/812406

Maybe this helps

Mar 27 '07 #4
On Mar 27, 12:05 pm, "Alexey Smirnov" <alexey.smir...@gmail.com>
wrote:
On Mar 27, 11:09 am, cyus...@gmail.com wrote:


On Mar 27, 3:22 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
<cyus...@gmail.comwrote in message
>news:11**********************@p77g2000hsh.googleg roups.com...
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading and HTTP
compression off-loading.My application is running on .NET 1.1, IIS 6,
Win2003.
Now we are having problem when trying to download word documents
located in the file server. It often says Internet Explorer cannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWord file, but most of the time we cannot open the document.
This is how I stream out the word contents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length", file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
I was informed that we have excluded application/msword from the
compression list.
Any idea what else could cause the problem in downloading the word
document?
Thanks a lot.- Hide quoted text -
- Show quoted text -
The file size is certainly not large. I've exprienced this problem
even when I tried to download a 51kb file. The file that we have has a
maximum of 4MB size limit.- Hide quoted text -
- Show quoted text -

Try to follow the code of this articlehttp://support.microsoft.com/kb/812406

Maybe this helps- Hide quoted text -

- Show quoted text -
If http compression for aspx is enabled, try to disable it.

Mar 27 '07 #5
On Mar 27, 6:24 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Mar 27, 12:05 pm, "Alexey Smirnov" <alexey.smir...@gmail.com>
wrote:


On Mar 27, 11:09 am, cyus...@gmail.com wrote:
On Mar 27, 3:22 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
<cyus...@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading andHTTP
>compressionoff-loading.My application is running on .NET 1.1, IIS 6,
Win2003.
Now we are having problem when trying to downloadworddocuments
located in thefileserver. It often saysInternetExplorercannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWordfile, but most of the time wecannotopenthe document.
This is how I stream out thewordcontents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length",file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
I was informed that we have excluded application/msword from the
>compressionlist.
Any idea what else could cause the problem in downloading theword
document?
Thanks a lot.- Hide quoted text -
- Show quoted text -
Thefilesize is certainly not large. I've exprienced this problem
even when I tried to download a 51kbfile. Thefilethat we have has a
maximum of 4MB size limit.- Hide quoted text -
- Show quoted text -
Try to follow the code of this articlehttp://support.microsoft.com/kb/812406
Maybe this helps- Hide quoted text -
- Show quoted text -

Ifhttpcompressionfor aspx is enabled, try to disable it.- Hide quoted text -

- Show quoted text -
Hi,

How do I disable the http compression for aspx? Would it be possible
to disable http compression for 1 aspx page only?

Sorry for asking stupid questions. I'm not really familiar with this
http compression stuff.

Thanks!

Mar 27 '07 #6
On Mar 27, 5:02 pm, cyus...@gmail.com wrote:
On Mar 27, 6:24 pm, "Alexey Smirnov" <alexey.smir...@gmail.comwrote:
On Mar 27, 12:05 pm, "Alexey Smirnov" <alexey.smir...@gmail.com>
wrote:
On Mar 27, 11:09 am, cyus...@gmail.com wrote:
On Mar 27, 3:22 pm, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
How big is the document? There is a known issue with Response.WriteFile when
downloading large files.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldin
<cyus...@gmail.comwrote in message
>news:11**********************@p77g2000hsh.googleg roups.com...
Hi,
We have just moved our application to a new webfarm server environment
which utilizing hardware load balancing, SSL off-loading andHTTP
compressionoff-loading.My application is running on .NET 1.1, IIS 6,
Win2003.
Now we are having problem when trying to downloadworddocuments
located in thefileserver. It often saysInternetExplorercannot
download <filenamefrom <servername>. Sometimes we are able to view
the MSWordfile, but most of the time wecannotopenthe document.
This is how I stream out thewordcontents to the browser
Response.ContentType = "application/msword";
Response.AddHeader("content-disposition","attachment; filename=" +
document.DocumentPath);
Response.AppendHeader("Content-Length",file.Length.ToString());
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
I was informed that we have excluded application/msword from the
compressionlist.
Any idea what else could cause the problem in downloading theword
document?
Thanks a lot.- Hide quoted text -
- Show quoted text -
Thefilesize is certainly not large. I've exprienced this problem
even when I tried to download a 51kbfile. Thefilethat we have has a
maximum of 4MB size limit.- Hide quoted text -
- Show quoted text -
Try to follow the code of this articlehttp://support.microsoft.com/kb/812406
Maybe this helps- Hide quoted text -
- Show quoted text -
Ifhttpcompressionfor aspx is enabled, try to disable it.- Hide quoted text -
- Show quoted text -

Hi,

How do I disable the http compression for aspx? Would it be possible
to disable http compression for 1 aspx page only?

Sorry for asking stupid questions. I'm not really familiar with this
http compression stuff.

Thanks!- Hide quoted text -

- Show quoted text -
Source: http://www.microsoft.com/technet/pro....mspx?mfr=true

You cannot disable the compression for 1 aspx page only, but you can
disable it just for 1 directory ("To enable HTTP Compression for
Individual Sites and Site Elements"). Try if it helps.

Mar 27 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mharris | last post by:
I need help with merging two Word documents into one through C# code. The problem isn't so much getting the documents put into one as it is maintaining the appropriate formatting, or rather...
2
by: Ian Gordon | last post by:
Hi, I have 2 problems when downloading a file from my ASP.net app to the client PC. At the moment I'm doing it with the following code: Response.ContentType = "application/octet-stream" ...
16
by: Simon Verona | last post by:
I have a problem with automating MS Word through vb.net My code is : Dim objword As new Word.ApplicationClass Try objWord.Documents.Open(letterfile)...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
0
by: mbbostwick | last post by:
I have a problem with a mail merge procedure I used to use with Access '97. We recently converted to Office XP (2002) and I now have an issue I am unfamilliar with and have been unable to...
11
by: leiz | last post by:
Hi, I am using COM to automate Word. In the main thread of my program, I store all the Document objects from Application.Documents. In one event handler (the event generated by Word), if i get...
15
by: =?ISO-8859-1?Q?J=F8rn?= Dahl-Stamnes | last post by:
Hello folks, I need some help/advice FAST. I have problems with addslashes on my web-servers. After uploading a file, I read the uploaded file, use addslashes on the read data and then insert...
8
by: Jeppe Dige Jespersen | last post by:
I am building a page that takes a single parameter: documentId. I have documents stored in a SQL Server 2005 database. Storing and retrieving these from a WinForms application works fine. No...
0
by: Srinivas Dammalapa | last post by:
Sir, I am D.Srinivas. I am working on JobPortal Website(www.tlabsinc.com). I am downloading MS-Word document using ASP.NET 2.0 & C# 2.0. I am using IE (Internet Explorer). In my...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.