var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Unable to download .docx document on windows server
I have a system allowing users to upload files to my site.
Those files are then available to download using a link, for instance www.mysite.com/uploads/document.doc
This works perfectly until someone uploads a word document with .docx extension. The file is uploaded fine but when using the link to download them it gives a 404 error.
I have tried with various names, with space and not in the name of the file etc but it is all the same.
Does any one know why and if there is a fix to this?
Just for clarification, is this what you're saying:
If I upload doc1. and then try and download it via docx I would get a 404 error? www.mysite.com/uploads/doc1. docx
Make sure that you have docx defined as a valid MIME type in IIS. You need to register the MIME type so IIS understands what it's supposed to put in the header when serving the file.
Oliflorence, did this fix the problem? The same thing is also happening to me. Thanks.
That's for defining the appropriate version of the .NET runtime. This isn't a .NET issue, it's an IIS issue.
@teddy - it worked perfectly !
i just register the xml files on the iis server, then restarted the iis.
everything works fine after that.
thanks! i'll blog about this.
-Nhoel of Keywordspeak.com