2013-11-28 5 views
0

Window Azure에서 클라우드 서비스로 MVC 응용 프로그램을 호스팅했습니다. 보고 용 RDLC보고 서비스를 사용합니다. 짧은 간격으로 처음 시작할 때마다 RDLC 보고서를 호출하면 서버 오류가 발생합니다. 새로 고침으로 문제가 해결되고 보고서가 올바르게로드됩니다. 환경 문제입니까? 어느 누구도 그런 문제에 직면 했습니까? 이 문제를 해결할 수있는 방법은 무엇입니까? 오류 세부 사항은 다음과 같다 :Windows Azure 클라우드 서비스 및 RDLC 보고서로드 오류

Server Error in '/' Application.

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

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.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

  1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

or:

2) Add the following section to the configuration file of your application:

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.] System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0 System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +525 System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +19 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +315 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +208 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +1171 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +146 System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +103 System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +592 System.Web.UI.ScriptManager..ctor() +30 ASP.rdlcs_viewreport_aspx.__BuildControlform1() +202 ASP.rdlcs_viewreport_aspx.FrameworkInitialize() +193 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +72 System.Web.UI.Page.ProcessRequest() +269 System.Web.UI.Page.ProcessRequest(HttpContext context) +167 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +664 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +270

+0

나는 하늘에서 이것을 수행했습니다. 무료 사용에서는 64 비트 컴파일 된 웹 사이트를 사용할 수 없으므로 빌드 구성이 X86 또는 X64인지 확인하는 것이 중요합니다. 또한 'Microsoft.ReportViewer.Common', 'Microsoft.ReportViewer.ProcessingObjectModel', 'Microsoft.ReportViewer.WebForms'를 '로컬 복사'로 설정하여 'true'로 설정해야합니다. Azure 환경에서 '살지 않는'프로젝트의 다른 참조와 함께해야합니다. 희망이 도움이됩니다! –

+0

아직도이 문제에 직면 해 있습니다. –

답변

0

구성 당신에게 푸른 클라우드 서비스는 내장에 .NET 4.5가 "윈도우 서버 2012 이상"과 같은 운영 체제에서 실행합니다.

enter image description here

관련 문제