locked
IIS 7.5+ 64bit having trouble loading C++ CLR dlls RRS feed

  • Question

  • User1270324942 posted

    My team recently upgraded from VS2008 to VS2015.  Our project is a combination of C# SDK layers and C++ core libraries that work in mixed mode CLR and direct unmanaged references/pinvoke.

    VS2015 compilations for desktop executables work just fine with managed and unmanaged versions across multiple environments.  However, when we use the same .NET drivers and C++ libraries in IIS/bin the web server is unable to load any C++ dll that is compiled with CLR.  This is within VS2015 and outside of it on both our development and production box.  We can set any C++ driver into managed CLR and we see the failed result:

    Error Could not load file or assembly 'ConfigAuth.DLL' or one of its dependencies. The specified module could not be found.

    The file is clearly found, the PATH variable triple checked.  We've run process monitors to find the dll file loading issue and can't seem to find anything that gives a clue as to what is missing.  We've had issues in the past with missing redistributable packages and have read that some combinations fail.  We've uninstalled and reinstalled these packages, but maybe we are doing it in the wrong sequence/combination?

    Development Box / Configuration:

    Windows 7, 64bit environment

    The following VS C++ Redistributable Packages are installed on the box: 2012,2013,2015 (both x86/64 for each)

    SxS merge modules for 2012-2015 are installed

    All files compile to Win32/x86 platform

    .NET 4.5 is used to compile the ASP.NET WCF Service build as well as all C# managed dlls

    .NET 4.0 is the mscorlib used to compile the C++ CLR 

    IIS 7.5+ 64bit having trouble loading C++ libraries compiled using 2015 toolkit on VS2015.

    IIS app pool supports 32 bit assemblies

    IIS app pool has all directory and windows access rights set to access the file

    PATH variable has been set and tested against other files that load just fine as non CLR

    Tuesday, September 5, 2017 11:08 PM

All replies

  • User-1716951449 posted

    The file is clearly found, the PATH variable triple checked

    .net assembly dependency doens't merely depend on "the file is there"

    the assembly version can be the factor, hence the side-by-side workaround

    do u even can build and run them in development environment on vs? if u can compile them properly, they should work, or u may look into iis app pool pipeline/clr version

    Wednesday, September 6, 2017 4:16 AM