Server2008上使用ReportViewer

在Server上面執行ReportViewer會出現找不到物件javascript的錯誤,只要在Web.config加上兩段語法就可以正常執行了

system.web中加入HttpHandler Mapping:
<add path="Reserved.ReportViewerWebControl.axd" verb="*" 
  type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, 
  Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
  validate="false" />

system.webServer加入以下的HttpHandler設定:
<add name="Reserved-ReportViewerWebControl-axd" 
 path="Reserved.ReportViewerWebControl.axd" 
 precondition="integratedMode" 
 resourcetype="Unspecified" 
 type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms,Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
 verb="*"/>

參考網址:http://blog.darkthread.net/blogs/darkthreadtw/archive/2009/02/02/reportviewer-2008-on-iis7.aspx

留言