프로덕션 사이트에서 보고서 뷰어에 이상한 문제가 있습니다. 사이트의 무대와 데모 버전을 동일한 컴퓨터에 배포했습니다. 최근에 나는 업데이트 작업을하고 있으며 제대로 작동하는 무대 버전으로 배포하고 있습니다. 오늘 데모에 배포하고 데모에서만 갑자기 보고서 뷰어가 손상되었습니다.프로덕션 사이트에서 보고서 뷰어 어셈블리 관련 문제
내가 갖는 오류 :
CS0433: The type 'Microsoft.Reporting.WebForms.ReportDataSource' exists in both
'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'
and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\h2o-demo\d354e6e4\ac3ce3e\assembly\dl3\67b85cd6\0027fec0_ed32ca01\Microsoft.ReportViewer.WebForms.DLL'
프로젝트는이 업데이트에서 10 보고서 뷰어 (9)에서 업데이트되었습니다. Web Config의 모든 참조는 프로젝트의 "참조"뿐만 아니라 업데이트되었습니다. "Temporary ASP.NET Files"에 삽입되는 버전이 실제로 어떤 이유로 든 버전 9임을 알았습니다.
다시 요약하면; 프로젝트는 내 로컬 컴퓨터에서 제대로 작동합니다. 또한 손상된 데모 사이트와 동일한 서버에 배포 된 Stage 사이트에서도 작동합니다.
아무도 내가 이것을 해결하기 위해 할 수있는 것에 대해 아이디어가 있습니까? 나에게 도움이되는 해결책이있는 리소스를 찾을 수없는 것 같습니다. 나는 compilation batch = false를 시도하고 assemblyredirect를 9에서 10까지 추가했다. (내가 잘못했을 수도 있음). 나는 왜 그것이 한 사이트에서 작동 할 것이지만 다른 사이트에서는 작동하지 않는지에 대해 정말로 혼란스러워합니다.
EDIT 1 : 좀 더 주위를 둘러 본 후 바인딩 리디렉션을 다시 시도했습니다. 이제 내 설정 파일은 다음과 같습니다.
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.10.0" newVersion="1.2.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportViewer.WebForms" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportViewer.Common" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="9.0.0.0" newVersion="10.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
"Log4Net"리디렉션이 이미 있으며 무대에 유일한 것입니다. "WebForms"를 추가 한 후에 "Common"에 오류가있어서 그 코드도 추가했습니다. 지금은이 오류를 받고 있어요 :
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified.
BindingRedirect가 도움이 될 수 있습니다. 어떻게했는지에 대한 코드를 보여줄 수 있습니까? – Jeroen
죄송합니다.나는 당신의 편집을 지 웁니다. 나는 그 중 대부분을 다시 넣었습니다. :) – William
제 답변을 [제발 파일이나 어셈블리를로드 할 수 없습니다. 'Microsoft.ReportViewer.Common, Version ...] (http://stackoverflow.com/questions/22253607/could-not-load-file-or-assembly-microsoft-reportviewer-common-version-11-0-0-0/33670464#33670464)? –