ASP.NET с Report Viewer не работает с интегрированным режимом IIS - PullRequest
0 голосов
/ 27 февраля 2019

Я работаю с ASP.NET со средством просмотра отчетов, чтобы показать отчеты.Когда веб-сайт настроен на IIS с классическим режимом, он работает нормально, и я могу видеть отчеты, но при настройке в интегрированном режиме некоторые элементы управления не отображаются в отчетах.Я использую описанный ниже обработчик в моем файле web.config:

<system.webServer>
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </handlers>
  </system.webServer>

Я пытался вызвать URL-адрес для непосредственного сбоя элементов управления и получаю сообщение об ошибке ниже:

ObjectDisposedException]: Safe handle has been closed
   at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
   at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
   at System.Security.Principal.Win32.ImpersonateLoggedOnUser(SafeAccessTokenHandle hToken)
   at System.Security.Principal.WindowsIdentity.SafeImpersonate(SafeAccessTokenHandle userToken, WindowsIdentity wi, StackCrawlMark& stackMark)
   at System.Security.Principal.WindowsIdentity.Impersonate()
   at Microsoft.Reporting.ServerImpersonationContext..ctor(WindowsIdentity userToImpersonate)
   at Microsoft.Reporting.WebForms.SoapReportExecutionService.ServerReportSoapProxy.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.ReportExecutionService.RenderStream(String Format, String StreamID, String DeviceInfo, String& Encoding, String& MimeType)
   at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.<>c__DisplayClass17.<RenderStream>b__16()
   at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
[MissingEndpointException]: The attempt to connect to the report server failed.  Check your connection information and that the report server is a compatible version.
   at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
   at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.RenderStream(String Format, String StreamID, String DeviceInfo, String& Encoding, String& MimeType)
   at Microsoft.Reporting.WebForms.ServerReport.InternalRenderStream(String format, String streamId, String deviceInfo, String& mimeType, String& encoding)
   at Microsoft.Reporting.WebForms.ReportControlSession.GetStreamImage(String streamID, String deviceInfo, String& mimeType)
   at Microsoft.Reporting.WebForms.ReportImageOperation.GetStreamImage(String streamID, HttpResponse response, String iterationId)
   at Microsoft.Reporting.WebForms.ReportImageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
   at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Может кто-нибудь помочь, пожалуйстамне решить эту проблему?

...