472,958 Members | 2,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 3721
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.