2016-11-04 4 views
0

네이티브 64 비트 dll을 사용하는 Azure Web API App을 만들었습니다. 문제없이 로컬에서 서비스를 실행할 수 있습니다. 그러나 Azure에서 호스트하려고하면 아래 오류가 발생합니다.Azure App에서 네이티브 64 비트 dll 참조

Azure 앱 내에 기본 DLL을로드하는 것과 관련하여 알려진 문제점이있는 thread이 있습니다. 나는 해결책을 따라 XDT 스크립트를 만들어서 bin 폴더 (D : \ home \ site \ wwwroot \ bin)를 PATH에 추가했다. 불행히도 그것은 도움이되지 못했습니다.

Azure 포털 콘솔을 사용하여 내 dll이 앱의 bin 폴더에 있는지 확인했습니다. 또한 Kudu에서 내 앱이 업데이트 된 경로를 확인했다. Azure Portal 내부의 응용 프로그램 설정이 64 비트로 설정되어 있는지 확인했습니다. 응용 프로그램 설정을 32 비트 모드로 다시 설정하면 dll이 발견되고 잘못된 형식 오류가 발생하므로 Azure 내부에 64 비트 dll을 참조하는 것과 같은 문제가있는 것 같습니다.

내 응용 프로그램 호출하려고 할 때 다음과 같은 오류가 점점 오전 : 문제는 내가 디버그로 DLL을 컴파일하고 그들이 VCRUNTIME를 참조 일으킨 해제하지 않은 것을

Server Error in '/' Application. 

    Could not load file or assembly 'My64Bit.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 'My64Bit.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 'My64Bit.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, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 
     System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +234 
     System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +108 
     System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +25 
     System.Reflection.Assembly.Load(String assemblyString) +34 
     System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49 

    [ConfigurationErrorsException: Could not load file or assembly 'My64Bit.DLL' or one of its dependencies. The specified module could not be found.] 
     System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +772 
     System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259 
     System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +163 
     System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +230 
     System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +76 
     System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +343 
     System.Web.Compilation.BuildManager.ExecutePreAppStart() +176 
     System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +734 

    [HttpException (0x80004005): Could not load file or assembly 'My64Bit.DLL' or one of its dependencies. The specified module could not be found.] 
     System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +539 
     System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +125 
     System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731 

답변

1

[...] D 및 MSVCP [...] D Azure에서 사용할 수없는 DLL을 디버그합니다. 릴리스에서 DLL을 다시 컴파일하면 문제가 해결됩니다.

관련 문제