SSRS Report Viewer刷新异常求助:IIS6异步模式回发后空白
Hey there, let's dive into the problem you're facing with your SSRS Report Viewer integration—especially the discrepancy between IIS7 (local) and IIS6 (deployed) when using Async mode, plus the refresh issue when Async is false. I’ve worked through similar deployment quirks before, so here’s a structured breakdown of what might be going wrong and how to fix it:
1. Async=false: Report Won’t Refresh When Filtering
When Async is disabled, the Report Viewer relies on full-page postbacks. The likely issue is that you’re not explicitly triggering a refresh of the report after applying filter parameters. Here’s how to fix it:
- In your grid’s filter event handler (e.g., button click or dropdown selection), make sure you:
- Update the SSRS report parameters with your filtered values (customer/product).
- Call the
Refresh()method on the Report Viewer’s ServerReport instance:ReportViewer1.ServerReport.SetParameters(new ReportParameter[] { new ReportParameter("CustomerId", selectedCustomerId), new ReportParameter("ProductId", selectedProductId) }); ReportViewer1.ServerReport.Refresh();
- Double-check that your page’s ViewState is enabled (
<%@ Page EnableViewState="true" %>) and the Report Viewer’sEnableViewStateproperty is also set totrue—this ensures filter state is preserved across postbacks.
2. Async=true: Page Blanks After Postback in IIS6
The local IIS7 vs deployed IIS6 behavior points to differences in how each IIS version handles asynchronous postbacks and HTTP handlers. Here are the most common fixes:
a. Fix HTTP Handler Mapping for ReportViewerWebControl.axd
IIS6 uses classic mode (unlike IIS7’s integrated mode), so it requires explicit mapping for the Report Viewer’s handler:
- Open IIS6 Manager, right-click your website → Properties → Home Directory tab → Configuration.
- Click Add to create a new handler mapping:
- Executable: Path to your .NET framework’s
aspnet_isapi.dll(e.g.,C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll—adjust for your .NET version). - Extension:
.axd - Verbs: Limit to
GET, POST, HEAD - Uncheck Check that file exists (critical, since this is a dynamic handler, not a physical file).
- Executable: Path to your .NET framework’s
- Restart your website and application pool.
b. Use Absolute URLs for Report Server
IIS6 can struggle with relative paths during asynchronous postbacks. Update your Report Viewer’s server report URL to an absolute path instead of a relative one:
<rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="true"> <ServerReport ReportServerUrl="http://your-report-server/ReportServer" ReportPath="/YourReportFolder/YourReportName" /> </rsweb:ReportViewer>
This ensures the Report Viewer can reliably reach the SSRS server during async calls, even after postbacks.
c. Verify Application Pool Permissions
IIS6 application pools often run with more restricted permissions than IIS7. Make sure:
- Your app pool’s identity (e.g., Network Service, or a dedicated domain account) has read access to your SSRS report server and the report itself.
- The identity has read/write permissions to the ASP.NET temporary files directory (typically
C:\Windows\Microsoft.NET\Framework\[version]\Temporary ASP.NET Files)—Report Viewer uses this to cache report resources during async rendering.
d. Debug with Browser Dev Tools
To pinpoint the exact error (since the page goes blank), use your browser’s developer tools (F12):
- Go to the Network tab, trigger the filter/postback, and look for requests to
ReportViewerWebControl.axd. - Check for 404 (handler missing) or 500 (server error) status codes—these will give you direct clues about what’s failing.
Final Notes
Start with the HTTP handler mapping first—it’s the most common culprit for IIS6 async issues. If that doesn’t fix it, move on to the URL and permission checks. For the Async=false scenario, always ensure you’re explicitly refreshing the report after updating parameters.
内容的提问来源于stack exchange,提问作者altaaf.hussein

