试了两种方式。
1. iis在windows 2003 server上,没有装AR
2. iis 在windows XP上 ,安装了vs2005和AR 6.0
3. 发布的网站上bin里都放了ActiveReports.Web.dll, ActiveReports6.dll,ActiveReports.PdfExport.dll等8个AR dll文件.
4. web.config: 追加了httpHandlers
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="ActiveReports.HtmlExport, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add assembly="ActiveReports.PdfExport, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add assembly="ActiveReports.XlsExport, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
。。。。。
<httpHandlers>
<add path="*.rpx" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add path="*.ActiveReport" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler, ActiveReports.Web, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add path="*.ArCacheItem" verb="*" type="DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler, ActiveReports.Web, Version=6.0.2019.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
</httpHandlers>
结果:访问这2个 IIS网站都发生上述错误。但是在VS2005调试,结果显示正确! |