views:

126

answers:

3

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 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?

A: 

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.

squillman
+2  A: 

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

Rob
A: 

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?

ewall