Using native DLLs not in Path

G

Guest

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(AssemblyName 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.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +32

[ConfigurationErrorsException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +580

System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
+45

System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory
vdir) +199

System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +37


System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory
vdir, VirtualPath virtualDir, Boolean ignoreErrors) +445

System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) +77

System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) +596


System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) +76


System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +86


System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(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.IHttpHandlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath) +62

System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
+294


System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +146
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top