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

Discussion in 'ASP .Net' started by Ravi, Jan 14, 2008.

  1. Ravi

    Ravi Guest

    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.RaisePostBackEvent(String eventArgument)
    +107

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection 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
     
    Ravi, Jan 14, 2008
    #1
    1. Advertising

  2. "Ravi" <> wrote in message
    news:...

    > 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.aspx?scid=kb;EN-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
     
    Mark Rae [MVP], Jan 14, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    401
  2. Peter
    Replies:
    7
    Views:
    552
    Peter
    May 2, 2008
  3. chris

    We all nee a little help now and then

    chris, Dec 13, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    99
    chris
    Dec 13, 2004
  4. chris

    We all nee a little help now and then

    chris, Dec 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    87
    chris
    Dec 13, 2004
  5. chris

    We all nee a little help now and then

    chris, Dec 13, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    80
    chris
    Dec 13, 2004
Loading...

Share This Page