문제

라이브러리를 사용하는 asp.net 웹 서비스가 있습니다. 이것은 일부 제 3 자 .dlls에 의존합니다.

라이브러리에 대한 참조를 웹 서비스에 추가하면 ComeXception을 얻고 사이트를로드 할 수 없습니다. ASPNET 사용자 자격 증명과 관련이 있다고 생각했기 때문에 Machine.config에서 CorceModel을 가장하고 사용하려고 시도했지만 아무것도 작동하지 않는 것 같습니다.

.dlls는 하드웨어와 통신하기위한 것이므로 서버에서도 라이브러리의 다른 부분 만 사용하지 않습니다.이 문제를 해결할 수있는 방법이 있습니까?

Visual 2008 SP1 및 .NET 3.5를 사용하여 Windows XP Pro SP3에서 실행 중입니다.

나는 그것을 고치는 유일한 방법은 라이브러리를 하드웨어와 비 하드웨어 기반으로 나누는 것입니다.

건배, 사르키

    The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 
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.Runtime.InteropServices.COMException: The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

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: 


[COMException (0x8007007f): The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)]

[FileLoadException: A procedure imported by 'OBIDISC4NETnative, Version=0.0.0.0, Culture=neutral, PublicKeyToken=900ed37a7058e4f2' could not be loaded.]
   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: A procedure imported by 'OBIDISC4NETnative, Version=0.0.0.0, Culture=neutral, PublicKeyToken=900ed37a7058e4f2' could not be loaded.]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
   System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
   System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
   System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext 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(HttpContext context, String verb, String url, String filePath) +180
   System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +102
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +193
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 
도움이 되었습니까?

해결책

올바른 길을 가준 Kim Gräsman에게 감사드립니다.

절차가 누락 된 이유는 ASP.NET이 현재 디렉토리가 아닌 %windir % System32에서 .dlls를로드하기 때문입니다.

거기를 보면, .dlls의 아주 오래된 버전이있었습니다 (누가/어떻게 거기에 도착했는지 확실하지 않음). 이것들을 보여주는 것을 삭제하면 fileioexception을 표시하므로 최신 .dlls로 교체하면 고정 된 것으로 보입니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top