Installing Office Interop assemblies on server
-
My web project is using interop to create word document. It works on my system since i have word installed on my system but Server does not have office installed so How can i install Office.Interop.WOrd assembly on server. Should i just copy the interop dll and register it or is there a setup i have to do?
-
My web project is using interop to create word document. It works on my system since i have word installed on my system but Server does not have office installed so How can i install Office.Interop.WOrd assembly on server. Should i just copy the interop dll and register it or is there a setup i have to do?
Installing the interop assembly on the server won't help. If the server doesn't have Office installed, you can't use Office on the server. Also, using Office interop from an ASP.NET application is not supported, and will most likely fail in interesting ways:
http://support.microsoft.com/kb/257757[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
You would do better to use a supported solution, such as the Open XML SDK[^], or DocX[^]. There's even an article introducing DocX here on CodeProject: C#: Create and Manipulate Word Documents Programmatically Using DocX[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
My web project is using interop to create word document. It works on my system since i have word installed on my system but Server does not have office installed so How can i install Office.Interop.WOrd assembly on server. Should i just copy the interop dll and register it or is there a setup i have to do?
As far as I am aware, you can;t do that - it is a breach of your licencing conditions, unless you purchase a copy of Office to install on the server. And if your server is run by a web hosting company, they might want to be involved in that - and would probably not be happy if you just add copyrighted assemblies to their equipment!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Installing the interop assembly on the server won't help. If the server doesn't have Office installed, you can't use Office on the server. Also, using Office interop from an ASP.NET application is not supported, and will most likely fail in interesting ways:
http://support.microsoft.com/kb/257757[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
You would do better to use a supported solution, such as the Open XML SDK[^], or DocX[^]. There's even an article introducing DocX here on CodeProject: C#: Create and Manipulate Word Documents Programmatically Using DocX[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
As far as I am aware, you can;t do that - it is a breach of your licencing conditions, unless you purchase a copy of Office to install on the server. And if your server is run by a web hosting company, they might want to be involved in that - and would probably not be happy if you just add copyrighted assemblies to their equipment!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
So you have an X-Y-problem: you want to do X, think of a way you can solve, get stuck with that way, and now you ask us about that (wrong) way... Ask the correct question!
-
So you have an X-Y-problem: you want to do X, think of a way you can solve, get stuck with that way, and now you ask us about that (wrong) way... Ask the correct question!