模块未发现异常从.NET 2.0的Web服务在Windows Server 2008 R2 [英] Module Not Found Exception From .NET 2.0 Web Service On Windows Server 2008 R2

查看:122
本文介绍了模块未发现异常从.NET 2.0的Web服务在Windows Server 2008 R2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个问题,即生成模块未发现异常,当我们试图加载在Server 2008上运行相同的2008版的第二个服务器加载业务精一个.NET 2.0的Web服务应用程序。
作为调查的一部分,我们已经采取了默认的Hello World .NET 2.0的Web服务并部署到服务器和有相同的问题,它运行良好,在一个而不是其他。这个问题正试图追查有问题的模块。正在运行的进程资源管理器和依赖学步车似乎并没有给我们一个线索。

完整的错误是: -

[FileNotFoundException异常:指定的模块找不到。 = (从HRESULT异常:0x8007007E)    System.Reflection.Assembly._nLoad(的AssemblyName文件名,字符串= codeBase的,证据assemblySecurity,大会locationHint,= StackCrawlMark和放大器; stackMark,布尔throwOnFileNotFound,布尔= forIntrospection)+ 0    System.Reflection.Assembly.nLoad(的AssemblyName文件名,字符串= codeBase的,证据assemblySecurity,大会locationHint,= StackCrawlMark和放大器; stackMark,布尔throwOnFileNotFound,布尔= forIntrospection)+43    System.Reflection.Assembly.InternalLoad(的AssemblyName assemblyRef,= 证据assemblySecurity,StackCrawlMark和放大器; stackMark,布尔= forIntrospection)+127    System.Reflection.Assembly.InternalLoad(字符串assemblyString,= 证据assemblySecurity,StackCrawlMark和放大器; stackMark,布尔= forIntrospection)+142    System.Reflection.Assembly.Load(字符串assemblyString)+28    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串= 的AssemblyName,布尔starDirective)+46

[ConfigurationErrorsException:指定的模块找不到。 = (从HRESULT异常:0x8007007E)    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串= 的AssemblyName,布尔starDirective)+613    = System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomai = nBinDirectory()+203    System.Web.Configuration.CompilationSection.LoadAssembly(程序集信息= 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,布尔ignoreErrors)+53    = System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirec = 保守党VDIR,VirtualPath virtualDir,布尔ignoreErrors)175    System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath = virtualPath)+86    = System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPa = 日virtualPath,布尔noBuild,布尔allowCrossApp,布尔= allowBuildIn precompile)+261    = System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpC = ontext背景下,VirtualPath virtualPath,布尔noBuild,布尔= allowCrossApp,布尔allowBuildIn precompile)+101    System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext的= 背景下,VirtualPath virtualPath,布尔noBuild,布尔= allowCrossApp,布尔allowBuildIn precompile)+83    System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext的= 背景下,VirtualPath virtualPath)+10    System.Web.UI.WebServiceParser.GetCompiledType(字符串INPUTFILE,= HttpContext的背景下)+43    = System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpCon = 文本上下文,字符串动词,URL字符串,字符串文件路径)+180    = System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IEx = ecutionStep.Execute()307    System.Web.HttpApplication.ExecuteStep(IExecutionStep步,= 布尔和放大器; completedSynchronously)+155

它驱使我们疯了。任何想法?

TIA

标记

解决方案

 你得到的错误是缺少非托管的DLL。

脚步:
1.请参阅处理器上运行,如果两者是不同的。
2.调试通过的code中的新machine.Step您code寻找到这种异常发生。随着中HRESULT,你会发现在那里的非托管的DLL函数被调用的异常。
3.检查非托管DLL。
4.检查它的存在并正确引用。
 

此外,在进程管理器比较这两个环境中加载的DLL。

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

解决方案

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.

这篇关于模块未发现异常从.NET 2.0的Web服务在Windows Server 2008 R2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆