Asp.net 设置ReportServerCredentials
我在Internet用户和SSR之间有一个asp.net层,因此没有windows身份验证。在用户登录到我的页面上的站点(它是一个具有登录、安全等功能的现有站点)后,我会向他们显示一个报告列表,并在他们选择一个时尝试在ReportViewer控件中显示它们Asp.net 设置ReportServerCredentials,asp.net,visual-studio-2010,reporting-services,Asp.net,Visual Studio 2010,Reporting Services,我在Internet用户和SSR之间有一个asp.net层,因此没有windows身份验证。在用户登录到我的页面上的站点(它是一个具有登录、安全等功能的现有站点)后,我会向他们显示一个报告列表,并在他们选择一个时尝试在ReportViewer控件中显示它们 rv1 is the reportviewer control. rv1.ProcessingMode = ProcessingMode.Remote; rv1.Visible = true; rv1.ServerReport.ReportS
rv1 is the reportviewer control.
rv1.ProcessingMode = ProcessingMode.Remote;
rv1.Visible = true;
rv1.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerUrl"]);
rv1.ServerReport.ReportPath = rptPath;
IReportServerCredentials irsc = new MyReportServerCredentials(name, password, domain);
rv1.ServerReport.ReportServerCredentials = irsc;
MyReportServerCredentials
是基于其他地方和MSDN指定的IReportServerCredentials
的类
执行该行时
rv1.ServerReport.ReportServerCredentials = irsc;
为我提供入口点NotFoundException
环境SSRS 2008、SQLS 2008 R2、asp.net 3.5、vs2010
编辑:ReportServerUrl指向reporting service,我出现此错误,并发现这是因为Microsoft.ReportViewer.WebForms和Microsoft.ReportViewer.Common程序集的版本不匹配 在我的例子中,我的web.config有:
<system.web>
...
<compilation debug="true" targetFramework="4.0">
<assemblies>
...
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
...
</compilation>
...
</system.web>
...
...
...
...
.aspx页面(包含ReportView控件)具有:
但是我的项目引用的是9.0.0.0版程序集,我只是在asp.net项目中删除了
Microsoft.ReportViewer.WebForms
和Microsoft.ReportViewer.Common
9.0.0.0版引用,并添加了10.0.0.0版引用。现在ReportViewer工作正常。你好,Joel。谢谢,它解决了这个问题。很抱歉,迟了几天没有回复。
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>