당신은 어떻게 볼 SQL Server2005 보고 서비스를 보고서에서 보 컨트롤 DMZ
-
09-06-2019 - |
문제
내가 원하는 것을 볼 수 있는 SQL Server2005Reporting Services 보고서 ASP.NET 응용 프로그램에서 DMZ 통해납니다.이 SQLand SSRS 서버 뒤에 방화벽입니다.
해결책
`그래서 나는 방식을 변경하는 ASP.NET 2.0 응용 프로그램이라고 보고서에서 페이지입니다.원래는 내가 사용하는 자바 스크립트를 열고 새로운 창을 엽니다.
ViewCostReport.OnClientClick = "window.open('" + Report.GetProjectCostURL(_PromotionID) + "','ProjectCost','resizable=yes')";
문제는 창입니다.공만 작품에서 클라이언트 네트워크 및 새로운 웹 서버에 있는 DMZ.을 만들 수 있었다 새로운 보고는 웹 양식을 포함한 보고 제어를 보려면 보고합니다.
다른 문제가 나가는 것을 보고 서버에 액세스할 수 있으로 윈도우 인증을 때 그에 의해 사용되는 다른 응용 프로그램에 대한 보고서 및 그 응용 프로그램의 역할에 대한 보고서 액세스입니다.그래서 떨어져 갔을 보고 제어를 가장하 windows 사용자.나는 해결책을 발견하 this:
새로 만들어 클래스를 구현하는 Microsoft.보고입니다.WebForms.IReportServerCredentials 인터페이스에 액세스하기 위한 보고서입니다.
public class ReportCredentials : Microsoft.Reporting.WebForms.IReportServerCredentials
{
string _userName, _password, _domain;
public ReportCredentials(string userName, string password, string domain)
{
_userName = userName;
_password = password;
_domain = domain;
}
public System.Security.Principal.WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
public System.Net.ICredentials NetworkCredentials
{
get
{
return new System.Net.NetworkCredential(_userName, _password, _domain);
}
}
public bool GetFormsCredentials(out System.Net.Cookie authCoki, out string userName, out string password, out string authority)
{
userName = _userName;
password = _password;
authority = _domain;
authCoki = new System.Net.Cookie(".ASPXAUTH", ".ASPXAUTH", "/", "Domain");
return true;
}
}
그때 생성 이벤트에 대한 단추를 호출하는 보고서:
protected void btnReport_Click(object sender, EventArgs e)
{
ReportParameter[] parm = new ReportParameter[1];
parm[0] =new ReportParameter("PromotionID",_PromotionID);
ReportViewer.ShowCredentialPrompts = false;
ReportViewer.ServerReport.ReportServerCredentials = new ReportCredentials("Username", "Password", "Domain");
ReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer.ServerReport.ReportServerUrl = new System.Uri("http://ReportServer/ReportServer");
ReportViewer.ServerReport.ReportPath = "/ReportFolder/ReportName";
ReportViewer.ServerReport.SetParameters(parm);
ReportViewer.ServerReport.Refresh();
}
제휴하지 않습니다 StackOverflow