Our web site is hosted in IIS with an AppPool set to run as a specific user account. When we directly refer to one of our managed assembly, no errors and the assembly is loaded ok. But the same assembly when referred to from the Mixed code (C++ code) throws the following exception
Could not load file or assembly 'MyDll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73' or one of its dependencies. The system cannot find the file specified.
Fusion Details show
=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = CRC.XMLInterfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73
(Fully-specified)
LOG: Appbase = file:///C:/Windows/SysWOW64/inetsrv/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: CRC.XMLInterfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a348e42a78edea73
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces.DLL.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces/CRC.XMLInterfaces.DLL.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces.EXE.
LOG: Attempting download of new URL file:///C:/Windows/SysWOW64/inetsrv/CRC.XMLInterfaces/CRC.XMLInterfaces.EXE.
Not sure why "AppBase" is set to inetsrv folder. Is there any way to force set the AppBase folder when loading from the mixed mode code. Same web site works perfectly fine on Windows Server 2008 R2. Problems started happening trying on Windows Server 2012.
Thanks