Open word document from ASP.NET application -


I use the following code snippet to open a local doc file and when I press Ctrl + F5 in Visual Studio So walks fine I just click on the button and Word2007 is opened on my machine and there the docox is displayed, but after publishing the application on the production server, it did not work. After clicking on the same button, nothing happened, can anyone tell me why?

What do I want to do is open a local stored DOCX from the client side's ASP.NET application in Word 2007. I do not want to use the Office COM object.

My code:

  ProcessStartInfo psi = new ProcessStartInfo (@ "winword.exe", @ "/ test.docx"); Process.Start (psi);  

Many thanks.

Your code is trying to open the word on the server and not the sole reason why it works in the development Does the client and server are on the same machine?

You can not open Word on client due to browser security restrictions. However, if you provide a link to the file, then users may be able to download and open the file if they have Word installed.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -