Could not load file or assembly 'Microsoft.Office.Interop.Word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sajithkahawatta
    New Member
    • Mar 2007
    • 18

    Could not load file or assembly 'Microsoft.Office.Interop.Word

    my web page C#.net is work properly in my iis .but when i publish in another server it give errers.i used vs2005 and ms word 2003.
    but in the server there is no vs2005 or word installed. it has only .net frame work installed.folow ing the error,

    Parser Error Message: Could not load file or assembly 'Microsoft.Offi ce.Interop.Word , Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c' or one of its dependencies. The system cannot find the file specified.

    Source Error:


    Line 27: <compilation debug="false">
    Line 28: <assemblies>
    Line 29: <add assembly="Micro soft.Office.Int erop.Word, Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c"/>
    Line 30: <add assembly="Offic e, Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c"/>
    Line 31:


    Source File: E:\hris\crisis\ web.config Line: 29

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Offi ce.Interop.Word , Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c' could not be loaded.

    should i install word or vs2005 or what is the reason.how can i fixed it
    Last edited by Frinavale; Jan 16 '09, 02:51 PM. Reason: Moved to ASP.NET from .NET
  • sajithkahawatta
    New Member
    • Mar 2007
    • 18

    #2
    Could not load file or assembly 'Microsoft.Offi ce.Interop.Word

    my web page C#.net is work properly in my iis .but when i publish in
    another server it give errers.i used vs2005 and ms word 2003.
    but in the server there is no vs2005 or word installed. it has
    only .net frame work installed.folow ing the error,

    Parser Error Message:
    Could not load file or assembly
    'Microsoft.Offi ce.Interop.Word , Version=11.0.0. 0, Culture=neutral ,
    PublicKeyToken= 71e9bce111e9429 c' or one of its dependencies. The
    system cannot find the file specified.


    Source Error:


    Line 27: <compilation debug="false">
    Line 28: <assemblies>
    Line 29: <add assembly="Micro soft.Office.Int erop.Word,
    Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c"/>
    Line 30: <add assembly="Offic e, Version=11.0.0. 0, Culture=neutral ,
    PublicKeyToken= 71e9bce111e9429 c"/>
    Line 31:


    Source File: E:\hris\crisis\ web.config Line: 29


    Assembly Load Trace: The following information can be helpful to
    determine why the assembly 'Microsoft.Offi ce.Interop.Word ,
    Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c'
    could not be loaded.


    should i install word or vs2005 or what is the reason.how can i fixed
    it

    i found that adding dll to the assembly cache in the server would solve the problem is it so should i add the dll in the bin file or what dll should i use.

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Suggest you try installing MS Word. HTH.

      Comment

      • sajithkahawatta
        New Member
        • Mar 2007
        • 18

        #4
        can i solve it without installing ms word. because this is a product server.

        Comment

        • sajithkahawatta
          New Member
          • Mar 2007
          • 18

          #5
          hey,
          i solved problem by adding Microsoft.Offic e.Interop.Word. dll to assembly cache in.net frame work configutation which is on the administrative tool.
          thank anyway.

          now i got another error,following is the error,

          "retriving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error : 80040154"

          is it a permissin error. if i add a com reference must ms word be instslled.can i do it without install ms office

          Comment

          • nafigueiredo
            New Member
            • Jan 2009
            • 3

            #6
            Could not load file or assembly 'Microsoft.Offi ce.Interop.Word

            Hi


            Have you ever managed to solve that COM issue? I'm facing the exact same problem!! :-(

            Thanks in advance.

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              You need to register the COM Object using the regsvr32 tool.
              You also need to make sure that the component is in a directory that your ASPNET user account has permissions to.

              Comment

              • nafigueiredo
                New Member
                • Jan 2009
                • 3

                #8
                Thanks for your reply.

                I've solved it by installing the office suite in the server.

                Although that solution does not please me...

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  Even though this solution doesn't please you, it appears that it is the only solution.

                  Apparently you cannot redistribute the Microsoft Office libraries when deploying your application. This is stated in the clause that allows you to develop applications using Microsoft Office (I actually just discovered this a few minutes ago).

                  This means that whenever you develop using Microsoft Office components your application will only work if Office has been installed on the system that you are deploying your application to.

                  In your case, it means that you have to install Office onto the web server.

                  A word of advice: make sure that you keep Office patched at all times while it is on the web server.

                  Comment

                  • nafigueiredo
                    New Member
                    • Jan 2009
                    • 3

                    #10
                    Thanks for your (very) quick answer.

                    I'll keep in mind what you've said about keeping Office patched up.

                    For the purpose (mailmerge e pdf) that i'm using it's going to be a little dificult to make my client have Office installed in his web servers, but that's life... :-P

                    Thanks, once again

                    Comment

                    Working...