problem downloading word documents

Discussion in 'ASP .Net' started by cyusman@gmail.com, Mar 27, 2007.

  1. Guest

    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 <filename> from <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, 2007
    #1
    1. Advertising

  2. 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


    <> wrote in message
    news:...
    > 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 <filename> from <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.
    >
    Eliyahu Goldin, Mar 27, 2007
    #2
    1. Advertising

  3. Guest

    On Mar 27, 3:22 pm, "Eliyahu Goldin"
    <> wrote:
    > 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
    >
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    > > 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 <filename> from <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, 2007
    #3
  4. On Mar 27, 11:09 am, wrote:
    > On Mar 27, 3:22 pm, "Eliyahu Goldin"
    >
    >
    >
    >
    >
    > <> wrote:
    > > 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

    >
    > > <> wrote in message

    >
    > >news:...

    >
    > > > 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 <filename> from <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
    Alexey Smirnov, Mar 27, 2007
    #4
  5. On Mar 27, 12:05 pm, "Alexey Smirnov" <>
    wrote:
    > On Mar 27, 11:09 am, wrote:
    >
    >
    >
    >
    >
    > > On Mar 27, 3:22 pm, "Eliyahu Goldin"

    >
    > > <> wrote:
    > > > 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

    >
    > > > <> wrote in message

    >
    > > >news:...

    >
    > > > > 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 <filename> from <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.
    Alexey Smirnov, Mar 27, 2007
    #5
  6. Guest

    On Mar 27, 6:24 pm, "Alexey Smirnov" <> wrote:
    > On Mar 27, 12:05 pm, "Alexey Smirnov" <>
    > wrote:
    >
    >
    >
    >
    >
    > > On Mar 27, 11:09 am, wrote:

    >
    > > > On Mar 27, 3:22 pm, "Eliyahu Goldin"

    >
    > > > <> wrote:
    > > > > 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

    >
    > > > > <> wrote in message

    >
    > > > >news:...

    >
    > > > > > 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 <filename> from <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, 2007
    #6
  7. On Mar 27, 5:02 pm, wrote:
    > On Mar 27, 6:24 pm, "Alexey Smirnov" <> wrote:
    >
    >
    >
    > > On Mar 27, 12:05 pm, "Alexey Smirnov" <>
    > > wrote:

    >
    > > > On Mar 27, 11:09 am, wrote:

    >
    > > > > On Mar 27, 3:22 pm, "Eliyahu Goldin"

    >
    > > > > <> wrote:
    > > > > > 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

    >
    > > > > > <> wrote in message

    >
    > > > > >news:...

    >
    > > > > > > 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 <filename> from <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/pr...289-94d3-4085-bc4e-24eb4f312e0e.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.
    Alexey Smirnov, Mar 27, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zak Chababe

    convert word documents using Perl

    Zak Chababe, Jul 12, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,353
    Zak Chababe
    Jul 12, 2003
  2. enak

    Creating Word documents on page

    enak, Oct 24, 2003, in forum: ASP .Net
    Replies:
    11
    Views:
    619
    Guest
    Nov 5, 2003
  3. Replies:
    1
    Views:
    479
    Juan T. Llibre
    Oct 18, 2006
  4. Roger Withnell

    Downloading Word and pdf documents

    Roger Withnell, Jul 5, 2003, in forum: ASP General
    Replies:
    1
    Views:
    104
    Robb Meade
    Jul 6, 2003
  5. Tony
    Replies:
    2
    Views:
    388
Loading...

Share This Page