1
votes

We have an issue with a .NET 2.0 web service application that is generating a module not found exception when we try to load on server 2008. A second server running the same 2008 version loads the service fine.
As part of the investigation we have taken the default hello world .NET 2.0 web service and deployed to both servers and have exactly the same issue with it running fine on one but not the other. The issue is trying to track down the module in question. Running process explorer and dependency walker doesn't seem to give us a clue.

The full error is:-

[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.nLoad(AssemblyName fileName, String = codeBase, Evidence assemblySecurity, Assembly locationHint, = StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean = forIntrospection) +43 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, = Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean = forIntrospection) +127 System.Reflection.Assembly.InternalLoad(String assemblyString, = Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean = forIntrospection) +142 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String = assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: The specified module could not be found. = (Exception from HRESULT: 0x8007007E)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String = assemblyName, Boolean starDirective) +613 = System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomai= nBinDirectory() +203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo = ai) +105 = System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSe= ction compConfig) +178 = System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory = vdir) +163 = System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(Virt= ualDirectory vdir, Boolean ignoreErrors) +53 = System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirec= tory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath = virtualPath) +86 = System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPa= th virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean = allowBuildInPrecompile) +261 = System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpC= ontext context, VirtualPath virtualPath, Boolean noBuild, Boolean = allowCrossApp, Boolean allowBuildInPrecompile) +101 System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext = context, VirtualPath virtualPath, Boolean noBuild, Boolean = allowCrossApp, Boolean allowBuildInPrecompile) +83 System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext = context, VirtualPath virtualPath) +10 System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, = HttpContext context) +43 = System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpCon= text context, String verb, String url, String filePath) +180 = System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IEx= ecutionStep.Execute() +307 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, = Boolean& completedSynchronously) +155

Its driving us crazy. Any ideas?

TIA

Mark

1

1 Answers

0
votes
the error you are getting is for a missing unmanaged DLL. 

steps:
1.  See the processors running, if the two are different.
2. Debug your code on the new machine.Step through the code to find where this exception occurs. With that HRESULT, you'll find the exception  where an unmanaged DLL function is called.
3. check the unmanaged DLL.
4. Check if it's there and are referenced correctly. 

Also in process explorer compare the loaded dlls in both environments.