469,892 Members | 2,171 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,892 developers. It's quick & easy.

How to open a docx file from an asp.net application

Hello, I hope all is well.. I was wondered if someone had a fix for
opening docx file... I am currently using the response.redirect("path
of word document") however it does not work while trying to open docx
files.. I recieve an "HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)" error...
thanks for your help.
Jul 31 '08 #1
2 3914
On Thu, 31 Jul 2008 05:22:52 -0700, gwen.demby wrote:
Hello, I hope all is well.. I was wondered if someone had a fix for
opening docx file... I am currently using the response.redirect("path of
word document") however it does not work while trying to open docx
files.. I recieve an "HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)" error... thanks for your help.

Is the "path of word document" a relative path in your virtual directory?
Then Perhaps your iis isn't configured to serve docx files, you can change
that in the iis administration under mime types.

If you're using the filesystem path (like response.redirect(@"c:
\foo.docx")), this doesn't work, instead you could in your asp page open
the file using the System.IO classes and stream it directly into the
Respone.OutputStream.
--
Ben | bschwehn.de
Jul 31 '08 #2
You need to add the mime type to IIS

docx is: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Oct 3 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Roel | last post: by
2 posts views Thread by asp.net | last post: by
2 posts views Thread by =?Utf-8?B?TWFkaXNvbg==?= | last post: by
6 posts views Thread by =?Utf-8?B?U1VOTlk=?= | last post: by
3 posts views Thread by mamul | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.