技术开发 频道

简单应用ReportViewer控件


【IT168技术文档】


  写一个类实现接口 Microsoft.Reporting.WebForms.IReportServerCredentials,用于Reporting Service的验证,有1个方法,2个属性,根据运行环境来实现这个接口,我这里使用环境的Web程序,Reporting Service需要Window身份验证:
public bool GetFormsCredentials(out System.Net.Cookie authCookie, out string userName, out string password, out string authority) { userName = String.Empty; password = String.Empty; authority = String.Empty; authCookie = null; return false; } public System.Security.Principal.WindowsIdentity ImpersonationUser { get { return null; } } public System.Net.ICredentials NetworkCredentials { get { return new NetworkCredential(userName, password, domain); } }
0
相关文章