调用SSRS报表服务器就问“需要验证”窗口
我刚开始在SSRS工作,我有一个很奇怪的问题,即当我打电话报表服务器URL即本地主机/报告调用SSRS报表服务器就问“需要验证”窗口
此URL需要身份验证窗口用户名和密码。喜欢这个。
如果我在这种情况下提交本地系统用户帐户信息,它会出现我想要的报告服务器屏幕。喜欢这个。
我已经创建了一个演示Web应用程序,并且在我使用ReportViewer
的default.aspx页面中显示报告并对其进行配置。这里是我使用 Default.aspx
页面的代码
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%">
</rsweb:ReportViewer>
Default.aspx.cs
页
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
IReportServerCredentials irsc = new CustomReportCredentials("username", "password", "India");
ReportViewer1.ServerReport.ReportServerCredentials = irsc;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://localhost/Reports");
ReportViewer1.ServerReport.ReportPath = "/SSRS_Demo/Report_CaseMain";
ReportViewer1.ServerReport.Refresh();
CustomReportCredentials.cs
类
public class CustomReportCredentials : IReportServerCredentials
{
// local variable for network credential.
private string _UserName;
private string _PassWord;
private string _DomainName;
public CustomReportCredentials(string UserName, string PassWord, string DomainName)
{
_UserName = UserName;
_PassWord = PassWord;
_DomainName = DomainName;
}
public WindowsIdentity ImpersonationUser
{
get
{
return null; // not use ImpersonationUser
}
}
public ICredentials NetworkCredentials
{
get
{
// use NetworkCredentials
return new NetworkCredential(_UserName, _PassWord, _DomainName);
}
}
public bool GetFormsCredentials(out Cookie authCookie, out string user, out string password, out string authority)
{
// not use FormsCredentials unless you have implements a custom autentication.
authCookie = null;
user = password = authority = null;
return false;
}
}
而且,当我在这种情况下运行此web的应用程序它会给我一个错误,即
请帮我我该怎么办,以解决这些所有错误.....
很长[R & d我得到了一个解决方案之后。我正在使用错误的SSRS服务网址。我正在使用localhost/Reports
,但实际上SSRS报告服务器URL是localhost/ReportServer
。所以通过使用这个新的报告服务URL,我得到了这个问题的解决方案。
点击您在localhost/Reports上的报告,然后转到该报告的属性。在右侧有'数据源'点击。然后仄单选按钮,在这里你需要指定你的SQL服务器凭据,即用户名和密码“安全存储在报表服务器证书”
一次性活动:一旦你点击了报告会再次询问用户名和密码第一次,以克服这一点下面的指导方针。
(I)打开Internet Explorer去上的Internet选项设置点击
(II)转到安全 - >本地Intranet - >点击网站
(iii)点击高级:
(iv)添加站点:ServerIP地址(例如:172.16.2.224或localhost),然后关闭。
你应该从这篇文章中删除你的第二个错误,并为它创建一个新问题... – 2012-07-13 08:12:04