我已经制作了一个 SSRS 报告,当我运行报告时显示了所有所需的数据,但是当我尝试在浏览器上查看时
http://localhost/Reporting/SSRSTestReport
它给了我一个错误
HTTP 错误 404.0 - 未找到 您要查找的资源已被删除、名称已更改或暂时不可用。
当我试图在aspx
页面中显示它时,它给了我一个这样的错误:
The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
The request failed with HTTP status 404: Not Found.
现在我在aspx.cs
页面中这样做:
try
{
IReportServerCredentials irsc = new CustomReportCredentials("sa", "arindam", "ITPL_PC1");
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/Reporting/SSRSTestReport");
ReportViewer1.ServerReport.ReportServerCredentials = irsc;
ReportViewer1.ServerReport.ReportPath = "D:\\SSRSTest\\SSRSTest\\SSRSTest\\SSRSTestReport";
ReportViewer1.ServerReport.Refresh();
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
CustomReportCredentials
我从这里获取的:Passing Credentials to Sql Report Server 2008
这是我http handler
的 web.config
<httpHandlers>
<remove path="*.asmx" verb="*"/>
<add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<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"/>
</httpHandlers>
请帮我解决这个问题,我知道我遗漏了一些东西但找不到