locked
Could not load file or assembly 'Interop.ActiveDs'. RRS feed

  • Question

  • Good Day,

    I am sitting with an issue (error below) that myself and a colleague have been struggling with for about a week now.  I have literally tried every "solution" I have found on the web, including every post that I have read here.  When I close my eyes at night I see forum address flashing up at me.

    Basically this is what happened.  We have a web service that was running on a 2003(64bit) server and IIS6.  This machine crashed and our new server is running 2008(64bit) and IIS7.5.  When trying to run the web service, the error below is what we get.

    As I stated above, we have tried a multitude of solutions as found in many forums.  We have tried compiling to x86, 64 and Any CPU.  We have tried copying the activeds.dll to different directories.  We have tried deleting all references to it in our project.  We have tried referencing the activeds.tlb file from a different directory so that VS2010 can build the interop for us.  We have also used the Fusion log Viewer to see if we could spot something.

    We have even tried copying a newer version activeds.dll to the SysWOW64 directory on the server but apparently administrator does not have rights to do this.  I think at this point my colleague and I are at our wits end as we have no idea where to turn next.

    Can someone maybe shed some light on this issue please?  As I have said I spent a day making sure that I read and tried every post that I could find on these forums relating to this issue.  I have also tried solutions from stackoverflow and several other .net forums.

    Any help and suggestions would be greatly appreciated.

     

    Could not load file or assembly 'Interop.ActiveDs' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    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.BadImageFormatException: Could not load file or assembly 'Interop.ActiveDs' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Interop.ActiveDs' 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].


    Stack Trace:

     

    [BadImageFormatException: Could not load file or assembly 'Interop.ActiveDs' or one of its dependencies. An attempt was made to load a program with an incorrect format.]

       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0

       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567

       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192

       System.Reflection.Assembly.Load(String assemblyString) +35

       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +118

     

    [ConfigurationErrorsException: Could not load file or assembly 'Interop.ActiveDs' or one of its dependencies. An attempt was made to load a program with an incorrect format.]

       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11392147

       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +484

       System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +127

       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334

       System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280

       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1087

     

    [HttpException (0x80004005): Could not load file or assembly 'Interop.ActiveDs' or one of its dependencies. An attempt was made to load a program with an incorrect format.]

       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352

       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141

       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309

    • Moved by Paul Zhou Thursday, October 27, 2011 8:22 AM off-topic (From:.NET Platform Architecture Development Discussions)
    Tuesday, October 25, 2011 1:15 PM

Answers

  • Yeah I have to agree.  This forum is sometimes less than helpful.  I posted the original post where I did as I found several other posts pertaining to the same issue there.  This is actually not a "ASP .NET" specific error.  I only had the issue when working with a webservice.

    Anyway @TheChancer0.....

    The way we eventually solved this (without any help from this forum) was to do the following:

    On the INTEROP reference in your project

    1) Set the Isolated property to TRUE

    2) Set the Embed Interop Type to FALSE.

     

    This worked for us.  Hope it helps you too.

     

    Cheers

    Friday, November 4, 2011 10:51 AM

All replies

  • Just as an update.  We have also tried setting the Enable 32bit Apps in the application to true and we have also totally opened up the .net temporary files directory (permissions wise).  Neither of these two solutions had any effect.

     

    Thanx

    Wednesday, October 26, 2011 5:07 AM
  • Hi,

     

    Welcome to the MSDN forum.

     

    According to your description, I'd like to move your thread to off-topic because it is a problem related to ASP.NET. You may post thread in ASP.NET Forum. There are more experts in that forum so that you may get more useful help there.

     

    Thank you for your posting and understanding.

    Have a nice day.


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, October 27, 2011 8:22 AM
  • Thanks for moving the post...with no link to where the issue now is.

    Maybe you could include a new location url on any others you move.

    I have this same problem and no idea where the follow up details are.

    Thanks.

    Friday, November 4, 2011 10:42 AM
  • Yeah I have to agree.  This forum is sometimes less than helpful.  I posted the original post where I did as I found several other posts pertaining to the same issue there.  This is actually not a "ASP .NET" specific error.  I only had the issue when working with a webservice.

    Anyway @TheChancer0.....

    The way we eventually solved this (without any help from this forum) was to do the following:

    On the INTEROP reference in your project

    1) Set the Isolated property to TRUE

    2) Set the Embed Interop Type to FALSE.

     

    This worked for us.  Hope it helps you too.

     

    Cheers

    Friday, November 4, 2011 10:51 AM
  • Thanks for moving the post...with no link to where the issue now is.

    Maybe you could include a new location url on any others you move.

    I have this same problem and no idea where the follow up details are.

    Thanks.


    The issue is just here. It wasn't moved to anywhere else. What Paul is suggesting is to try a different forum that cannot be moved to from this forum, because they are not linked. The question isn't supported in the .NET Platform forum.
    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Wednesday, November 16, 2011 4:15 PM
  • Yeah I have to agree.  This forum is sometimes less than helpful.  I posted the original post where I did as I found several other posts pertaining to the same issue there.  This is actually not a "ASP .NET" specific error.  I only had the issue when working with a webservice.

    Anyway @TheChancer0.....

    The way we eventually solved this (without any help from this forum) was to do the following:

    On the INTEROP reference in your project

    1) Set the Isolated property to TRUE

    2) Set the Embed Interop Type to FALSE.

     

    This worked for us.  Hope it helps you too.

     

    Cheers


    This is definitely the answer then. I was going to ask you which forum you wanted me to move this into. I'm sorry that the .NET Platform forum didn't work out. Do you think it belonged in a .NET platform forum?

    I'm asking in order to figure out how to make this all clearer for people posting questions. Automatically getting your question moved to Off Topic with a request to submit your question to another forum, without fully understanding if the question also applies to other potential forums... definitely seems like there is potential frustration. Is that the solution, to ask Paul to move a little slower? Thanks for the feedback!

    Also, please understand that there are 100+ forums, and each is run by a different set of moderators. So everybody's experience is going to be a little different.

    Thanks!


    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Wednesday, November 16, 2011 4:21 PM