473,398 Members | 2,188 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,398 software developers and data experts.

Open MS Word 2003 document from VS2005- ASP.NET web page- Help nee

public WordApp()
{
//oWordAppl = new
Microsoft.Office.Interop.Word.ApplicationClass();
}

When I click a button in my aspx file I geet the followign error. I am
trying to open word from server side (Word is also isntalled in windows2003
server)
Retrieving the COM class factory for component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80080005.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving
the COM class factory for component with CLSID
{000209FF-0000-0000-C000-000000000046} failed due to the following error:
80080005.

Source Error:
Line 31: public WordApp()
Line 32: {
Line 33: oWordAppl = new Word.ApplicationClass();
Line 34: //oWordAppl = new
Microsoft.Office.Interop.Word.ApplicationClass();
Line 35: }
Source File: d:\inetpub\wwwroot\PROBATION_NET\App_Code\WordApp. cs Line: 33

Stack Trace:
[COMException (0x80080005): Retrieving the COM class factory for component
with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following
error: 80080005.]
WordApp..ctor() in d:\inetpub\wwwroot\PROBATION_NET\App_Code\WordApp. cs:33
DrugTest_DrugTest.Button2_Click(Object sender, EventArgs e) in
d:\inetpub\wwwroot\PROBATION_NET\DrugTest\DrugTest .aspx.cs:279
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
+107

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42
Jan 14 '08 #1
1 4708
"Ravi" <Ra**@discussions.microsoft.comwrote in message
news:0C**********************************@microsof t.com...
public WordApp()
{
//oWordAppl = new
Microsoft.Office.Interop.Word.ApplicationClass();
}
Server-side instantiation of Office is extremely risky and unstable, and
neither recommended nor supported by Microsoft:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367

Uninstall Word from your webserver and use this instead:
http://www.aspose.com/Products/Aspose.Words/
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jan 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web...
8
by: Asma | last post by:
Dear Sir, I am trying to find a way to open a Word document using C language and read the text of word doc into a variable. (Turbo C on Dos 6.0). Can anyone please tell me which libraries in...
8
by: sudha | last post by:
Hi, To open a word doc from c#, i use the following code : Word.ApplicationClass WordApp = new Word.ApplicationClass (); // give any file name of your choice. object fileName =...
1
by: webstuff | last post by:
Hi, I'm getting a 'Type mismatch' exception when calling the Word.Application.Documents.Open method when using the Office XP 2003 PIAs. the actual error is: ...
6
by: jimryder | last post by:
Hi, The following snippet: (ds is a populated dataset) string sXSLT = @"C:\XML\template\template.xsl"; string sTemp = @"C:\XML\temp\temp.xml"; string sOutput = @"C:\XML\output\output.xml";...
4
by: Fabian | last post by:
Hello, I want to open a Word Document in my C# Programm. I tried this : Word.Application wordapp = new Word.Application(); object path = "TEST.DOC"; object vk_read_only = false; object...
0
by: jefftim | last post by:
Hi All I've saved a word document in sql server database.I'm able to retrieve it from the database and open it in a word application. My problem is I'm able to open it in server/client machines...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
2
by: jefftim | last post by:
Hi All I've saved a word document in sql server database.I'm able to retrieve it from the database and open it in a word application. My problem is I'm able to open it in server/client machines...
0
by: RKovach | last post by:
I am automating Word and getting the existing instance if available using the following: Word.Application oWord = null; Word.Document oDoc = null; object oMissing =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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.