Can't open docx files online on Win2003 server - get 403
I have a asp.net web application that runs locally and opens docx files in IE8. However, after deploying to our production server (Win2003), I get a 403 error. The same code works for doc files, just not docx开发者_JS百科 files. So, I've narrowed the problem down to the server but do not have good direction.
I read that it might be a MIME type issue, but I'm not exactly sure what to enter into the executable path in IIS 6.0. I do not have any MIME changes locally, but maybe I installed a patch of some sort...
Does anyone have direction or an easier way to do this on the server?
Could be the mime type. Also had problems with it, but fixed it with a download handler i wrote manually in an user control. Was on IIS7 though and i'm not sure if IIS6 supports DOCX. So try adding the MIME type on the server.
mime type:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
And maybe this article helps to
Add your mime type on the server and try this for the .docx extension:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Everything's probably running fine locally because you have Office installed locally. I'm guessing that's not the case on the server.
Here's a good chart of Office mime types.
The first thing that comes to my mind with an HTTP error code 403 is permissions. Does the account that the IIS service is running under (e.g. IUSR_MachineName, IWAM_MachineName) have rights to access the directory and documents you are trying to open?
精彩评论