我想添加第三方C#DLL作为资源在我的Asp.net WebService项目与这些配置。无法加载文件或程序集“idrsnet15.dll”或其某个依赖项。指定的模块无法找到
C#DLL在运行时版本(4.0.30319)的x64环境中构建在dotnet framework 4中。
我们使用VS 2010框架版本4.0.30319 RTMRel;在ASP.Net webservice项目配置下,我们使用目标x64平台设置目标框架4。
我需要使用此DLL到我的Web服务应用程序,但通过IIS浏览时获取运行时异常。
----------------------------错误详情---------------- --------------------------------------------
Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192 System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +118[ConfigurationErrorsException: Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11392147
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +484 System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +127 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1087[HttpException (0x80004005): Could not load file or assembly 'idrsnet15.dll' or one of its dependencies. The specified module could not be found.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 ----------------------------ERROR DETAIL------------------------------------------------------------
我们通过选择3.5框架创建Asp.net项目,然后在应用程序配置下设置目标框架4.0。
我可以见证TempAsp.net文件,包括此路径下组装和第三方DLL: C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \临时ASP.NET文件\ myocrapp \ f4fd840d \ f71f8f0e \总成\ DL3 \ 1a6aa3d5 \ 00bb235d_957bcf01
请考虑将帖子的名称更改为用户更容易的内容,如[如何提问](http://stackoverflow.com/help/how-to-ask)部分所述。 – 2014-10-09 10:20:54