问题描述
1.问题,***.dll是c++写的,在客户端程序调用是可以的2.本地机器win764位3.移植到webservice,生成网站时,总是提示:源错误:执行当前Web请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。堆栈跟踪:[FileNotFoundException:未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Reflection.RuntimeAssembly._nLoad(AssemblyNamefileName,StringcodeBase,EvidenceassemblySecurity,RuntimeAssemblylocationHint,StackCrawlMark&stackMark,BooleanthrowOnFileNotFound,BooleanforIntrospection,BooleansuppressSecurityChecks)+0System.Reflection.RuntimeAssembly.nLoad(AssemblyNamefileName,StringcodeBase,EvidenceassemblySecurity,RuntimeAssemblylocationHint,StackCrawlMark&stackMark,BooleanthrowOnFileNotFound,BooleanforIntrospection,BooleansuppressSecurityChecks)+39System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyNameassemblyRef,EvidenceassemblySecurity,StackCrawlMark&stackMark,BooleanforIntrospection,BooleansuppressSecurityChecks)+132System.Reflection.RuntimeAssembly.InternalLoad(StringassemblyString,EvidenceassemblySecurity,StackCrawlMark&stackMark,BooleanforIntrospection)+144System.Reflection.Assembly.Load(StringassemblyString)+28System.Web.Configuration.CompilationSection.LoadAssemblyHelper(StringassemblyName,BooleanstarDirective)+46[ConfigurationErrorsException:未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Web.Configuration.CompilationSection.LoadAssemblyHelper(StringassemblyName,BooleanstarDirective)+618System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()+209System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfoai)+130System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSectioncompConfig)+178System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()+94System.Web.Compilation.BuildManager.CallPreStartInitMethods()+332System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManagerappManager,IApplicationHostappHost,IConfigMapPathFactoryconfigMapPathFactory,HostingEnvironmentParametershostingParameters,PolicyLevelpolicyLevel,ExceptionappDomainCreationException)+677[HttpException(0x80004005):未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Web.HttpRuntime.FirstRequestInit(HttpContextcontext)+9172992System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContextcontext)+97System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequestwr)+258
解决方案
解决方案二:
没有找到MeshFactory.DLL,或者版本不对,是64位的MeshFactory.DLL吗
解决方案三:
如果你dll是c++写的,就是非托管dll,非托管不能这样加载,用DllImport
解决方案四:
引用2楼bdmh的回复:
如果你dll是c++写的,就是非托管dll,非托管不能这样加载,用DllImport
这个c++写的,生成的是程序集,不是纯c++,是混编的,没法用DllImport方法
解决方案五:
引用2楼bdmh的回复:
如果你dll是c++写的,就是非托管dll,非托管不能这样加载,用DllImport
是32位的
解决方案六:
问题已解决,不是版本问题,引用楼主htornado的回复:
1.问题,***.dll是c++写的,在客户端程序调用是可以的2.本地机器win764位3.移植到webservice,生成网站时,总是提示:源错误:执行当前Web请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。堆栈跟踪:[FileNotFoundException:未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Reflection.RuntimeAssembly._nLoad(AssemblyNamefileName,StringcodeBase,EvidenceassemblySecurity,RuntimeAssemblylocationHint,StackCrawlMark&stackMark,BooleanthrowOnFileNotFound,BooleanforIntrospection,BooleansuppressSecurityChecks)+0System.Reflection.RuntimeAssembly.nLoad(AssemblyNamefileName,StringcodeBase,EvidenceassemblySecurity,RuntimeAssemblylocationHint,StackCrawlMark&stackMark,BooleanthrowOnFileNotFound,BooleanforIntrospection,BooleansuppressSecurityChecks)+39System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyNameassemblyRef,EvidenceassemblySecurity,StackCrawlMark&stackMark,BooleanforIntrospection,BooleansuppressSecurityChecks)+132System.Reflection.RuntimeAssembly.InternalLoad(StringassemblyString,EvidenceassemblySecurity,StackCrawlMark&stackMark,BooleanforIntrospection)+144System.Reflection.Assembly.Load(StringassemblyString)+28System.Web.Configuration.CompilationSection.LoadAssemblyHelper(StringassemblyName,BooleanstarDirective)+46[ConfigurationErrorsException:未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Web.Configuration.CompilationSection.LoadAssemblyHelper(StringassemblyName,BooleanstarDirective)+618System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()+209System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfoai)+130System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSectioncompConfig)+178System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()+94System.Web.Compilation.BuildManager.CallPreStartInitMethods()+332System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManagerappManager,IApplicationHostappHost,IConfigMapPathFactoryconfigMapPathFactory,HostingEnvironmentParametershostingParameters,PolicyLevelpolicyLevel,ExceptionappDomainCreationException)+677[HttpException(0x80004005):未能加载文件或程序集“MeshFactory.DLL”或它的某一个依赖项。找不到指定的模块。]System.Web.HttpRuntime.FirstRequestInit(HttpContextcontext)+9172992System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContextcontext)+97System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequestwr)+258
解决方案七:
你怎么解决的?求解答。。。
解决方案八:
试试,加入全局程序集