We are developing an Asp.Net 2.0 application (Web Administration) for the IIS
5.0 to 6.0 and the W2K to W2K3 operating system. The application consists of
several layers. One layer is a .Net 2.0 Classlibrary (DxuCoreClr.dll) written
in managed C++, that is encapsulating several native Api's in form of native
Win32 dlls (i.e. dxldaputils.dll). The Classlibrary and the native dlls are
installed to the bin directory of the Asp.Net 2.0 application.
When running the Asp.Net 2.0 application, the code fails to call classes
from the Classlibrary DxuCoreClr.dll. An exception with the message "The
specified module could not be found. (Exception from HRESULT: 0x8007007E)" is
thrown. (See below for the stack backtrace)
It seems that the Classlibrary DxuCoreClr.dll is not the problem, but the
linked native dlls can not be loaded. Putting the native dlls in the path
solves the problem.
Our customers wants to use applications with different versions of the
native dlls on one system, so that putting the native dlls into the path is
not the solution and we can not use Windows Side-By-Side (WinSxS) on Windows
2000 . The question is, how can i install native dlls to be used by a .Net
2.0 Classlibrary and avoid using the path or any other common system
directory.
Regards
Stack backtrace:
[FileNotFoundException: The specified module could not be found. (Exception
from HRESULT: 0x8007007E)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyNa me assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence
assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +32
[ConfigurationErrorsException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAs semblyHelper(String
assemblyName, Boolean starDirective) +580
System.Web.Configuration.CompilationSection.LoadAl lAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAs sembly(AssemblyInfo ai)
+45
System.Web.Compilation.BuildManager.GetReferencedA ssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler.. ctor(VirtualDirectory
vdir) +199
System.Web.Compilation.BuildManager.BatchCompileWe bDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +37
System.Web.Compilation.BuildManager.BatchCompileWe bDirectory(VirtualDirectory
vdir, VirtualPath virtualDir, Boolean ignoreErrors) +445
System.Web.Compilation.BuildManager.CompileWebFile (VirtualPath
virtualPath) +77
System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) +596
System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) +76
System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +86
System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) +42
System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context,
String requestType, VirtualPath virtualPath, String physicalPath) +32
System.Web.UI.PageHandlerFactory.System.Web.IHttpH andlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath) +62
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
+294
System.Web.MapHandlerExecutionStep.System.Web.Http Application.IExecutionStep.Execute() +139
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +146