locked
Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. RRS feed

  • Question

  • User-1309553206 posted

    I developed an application that opens Outlook on a button click. When I tested it locally it works fine with out any issues. I moved the code to test server and I am getting below error. How can I fix it? I have Microsoft office 2010 installed on my local machine as well as on the test server.

    Dim Outl As Microsoft.Office.Interop.Outlook.Application = New Microsoft.Office.Interop.Outlook.Application()

    I also tried using 

    'Dim Outl As Object
    'Outl = CreateObject("Outlook.Application")

    ' Outl = Activator.CreateInstance(Type.GetTypeFromProgID("Outlook.Application"))

    All these statements worked on my local environment and they didn't work on test server.

    Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.

    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.IO.FileNotFoundException: Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' could not be loaded.

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    Wednesday, June 13, 2018 6:54 PM

All replies

  • User1120430333 posted

    I developed an application that opens Outlook on a button click. When I tested it locally it works fine with out any issues. I moved the code to test server and I am getting below error. How can I fix it? I have Microsoft office 2010 installed on my local machine as well as on the test server.

    Well, I suspect you did it with IIS Express, which is not IIS not the real one. The real IIS the one on your local devilment machine that is the same one on the test server is the local IIS. You should have debugged your code with Visual Stuido against local IIS before you deployed it out to your test IIS server, which may have exposed the situation.

    http://codetunnel.com/how-to-debug-your-aspnet-projects-running-under-iis/

    Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.

    The DLL may have been in the Bin folder on your local machine for the Web program using IIS Express, but the DLL is not there in the Bin folder for the Web program on the test IIS server.

    Thursday, June 14, 2018 1:47 AM
  • User283571144 posted

    Hi smilingLily,

    As far as I know, your server need have the corresponding version of Office installed. 15.0.0.0 should correspond to Office 2013 - that needs to be installed on your target machine (other versions of Office may not work). 

    I suggest you could try to use 14.0.0.0 or 12.0.0.0, maybe it will work well.

    Besides, I don't suggest you use Office Interop , I suggest you could try to use  external library.

    Like:

    OPEN XML SDK

    Free .NET Office Library

    Best Regards,

    Brando

    Thursday, June 14, 2018 6:46 AM
  • Saturday, July 28, 2018 8:19 PM