2014-12-11 2 views
25

Visual Studio 2013에서 만든 새로운 MVC5 프로젝트를 로컬로 실행하려고하면 잘 작동합니다. 그러나 Azure 웹 사이트에 게시하면 다음 페이지가 나타납니다.파일 또는 어셈블리 'Microsoft.Owin.Security.Cookies'또는 해당 종속성 중 하나를로드 할 수 없습니다.

'Microsoft.Owin.Security.Cookies'또는 해당 종속성 중 하나를로드 할 수 없습니다. 찾은 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)

그리고 스택 추적 :

[FileLoadException이 : 파일이나 어셈블리 'Microsoft.Owin.Security.Cookies'를로드 할 수 없습니다 또는 해당 종속성 중 하나. 찾은 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT 예외 : 0x80131040)]

[FileLoadException : 파일 또는 어셈블리 'Microsoft.Owin.Security.Cookies, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'또는 해당 종속성 중 하나를로드 할 수 없습니다. 찾은 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)] System.Reflection.RuntimeAssembly._nLoad (의 AssemblyName 파일 이름, 문자열 코드베이스> 증거 assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr 부울 throwOnFileNotFound 부울 forIntrospection 부울 suppressSecurityChecks) +0 시스템 .Reflection.RuntimeAssembly.nLoad (의 AssemblyName 파일 이름, 문자열 코드베이스, 증거 assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, IntPtr입니다 pPrivHostBinder, 부울 throwOnFileNotFound, 부울 forIntrospection, 부울 suppressSecurityChecks) +34 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName (의 AssemblyName assemblyRef, 증거 assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean throwOnF ileNotFound 부울 forIntrospection 부울 suppressSecurityChecks) 152 System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString, 증거 assemblySecurity, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr 부울 forIntrospection) +77 System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString 증거 assemblySecurity, StackCrawlMark & stackMark 부울 forIntrospection) +16 System.Reflection.Assembly.Load (문자열 assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper (문자열의 AssemblyName 부울 starDirective) +38

[ConfigurationErrorsException : 파일 또는 어셈블리 'Microsoft.Owin.Security.Cookies, 버전을로드 할 수 없습니다. = 3.0.0.0, 문화 = 중립, PublicKeyToken = 31bf3856ad364e35 '또는 그 종속성 중 하나. 찾은 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper (문자열의 AssemblyName 부울 starDirective) 736 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 217 ​​ System.Web.Configuration.CompilationSection. LoadAssembly (어셈블리 정보 AI) 130 System.Web.Compilation.BuildManager.GetReferencedAssemblies (CompilationSection compConfig) 170 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91 System.Web.Compilation.BuildManager.CallPreStartInitMethods (문자열 preStartInitListPath , 부울 & isRefAssemblyLoaded) +284 System.Web.Compilation.BuildManager.ExecutePreAppStart() +153 System.Web. Hosting.HostingEnvironment.초기화 (하게, ApplicationManager AppManager를, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters의 hostingParameters, PolicyLevel policyLevel, 예외 appDomainCreationException) 521

[HttpException (0X80004005) : 파일이나 어셈블리를로드 할 수 없습니다 'Microsoft.Owin.Security.Cookies, 버전 = 3.0 .0.0, Culture = 중립, PublicKeyToken = 31bf3856ad364e35 '또는 그 종속성 중 하나. 찾은 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)] System.Web.HttpRuntime.FirstRequestInit (HttpContext를 컨텍스트) 9,930,568 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext를 컨텍스트) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest WR, 문맥으로 HttpContext) +254

버전 3.0.0의 Microsoft.Owin이 설치되어 있으며 Web.config 및 packages.config에 동일한 내용이 나와 있습니다. 이 문제를 어떻게 해결할 수 있습니까?

+3

'Update-Package -ProjectName myproject' –

답변

81

시도 :

  1. 3.0.0
  2. 에 2.1.0에서 Microsoft.Owin.Security.OAuth 업그레이드 3.0.0
  3. 에 2.1.0에서 Microsoft.Owin.Security.Cookies 업그레이드 3.0.0
  4. 에 2.1.0에서 Microsoft.Owin.Security 업그레이드

위의 패키지를 업그레이드 한 후에도 문제가 해결되었습니다.

+3

그래, 나는 이것을 얼마 전에 알아 냈고이 질문을 깜빡했다. 요구하는 패키지를 다시 설치하기 만하면됩니다. 대답 할 시간을내어 주셔서 감사합니다! – ohyeah

+0

새로운 문제가 생겼습니다. 같은 문제가 있습니다. 그들 모두를 같은 버전으로 가져가는 것이 도움이되었습니다. –

+0

그래, 나를 위해 일한, 버전 3.0으로 업그레이 드하고 오류가 사라집니다 – Raffaeu

관련 문제