473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 4087
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roel | last post by:
Hi all, I'm using the FileUpload control for uploading MS Word and MS PowerPoint documents. To check if a user uploads a correct document, I check the contenttype...
9
by: John Kotuby | last post by:
Hi all... While looking around for tools to create Excel files from either HTML pages or the Data I use to assemble them, I got an interesting response from a vendor. I have looked at Apose, and...
2
by: asp.net | last post by:
hello gents, i have a similar thing to do. i am not much into .net yet. i am currently working on asp website which generates doc file on a fly. i now want to convert these doc to docx files. i am...
2
by: =?Utf-8?B?TWFkaXNvbg==?= | last post by:
Hi there, I'm working with VS 2008(framework3.5), IIS6, SQL Server 2005. I have website that allow users to upload doc, docx, xls, xlsx ... and so on. I save file to SQL Server 2005 with...
6
by: =?Utf-8?B?U1VOTlk=?= | last post by:
Hi, i am uploading a .docx file into sql2005 and later when i retrieve the file from the database and i open it, i get a error message "The file is corrupted and cannot be open". I am not facing...
3
by: mamul | last post by:
Hi can some one help me how to read a .docx file and stored into memory in c++. Thanks
1
by: mamul | last post by:
Hi All, I am able to read and write to .txt, .bin files. but the same program is not support for .docx file . can someone help me the procedure to perform read write operation on .docx file. ...
0
by: nightscorpion | last post by:
Hello Everyone , im supposed to create a Customer with labels (name,add,Telnr...)and textboxes(thomas ,karsplatz,23423423423) in a windows form. i store all these data in a class...
5
by: jettimadhu | last post by:
Hi , I want to convert the HTML/XML file to all other Ms-office file extentions like .ppt,.pptx,.docx.... Is there any API' s to get a possible solution for this problem?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.