emregon
emregon

Reputation: 418

Report Server Credentials and Missing End Point Exception

Actually what I needed was a step by step guide but anyway..

I have to show some rdl reports in a web-site using the ASP.NET report vievew and do all the necessary configurations for the Reporting Services. The users of the page should not deal with ANY authorization.

Here is my code for the report viewer:

rprtView.ServerReport.ReportServerCredentials = new ReportServerCredentials();
rprtView.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
rprtView.ServerReport.ReportServerUrl = new Uri(@"http://mydomain/reports");
rprtView.ServerReport.ReportPath = @"/MyReports/PurchaseOrder";
rprtView.ShowParameterPrompts = false;

ReportParameter[] parameters = new ReportParameter[1];
parameters[0] = new ReportParameter();
parameters[0].Name = "OrderNumber";
parameters[0].Values.Add(orderNumber);

rprtView.ServerReport.SetParameters(parameters);
rprtView.ServerReport.Refresh();

Here is my overload for IReportServerCredentials

public class ReportServerCredentials : IReportServerCredentials
{
    public bool GetFormsCredentials(out Cookie authCookie, out string userName, out string password, out string authority)
    {
        authCookie = null;
        userName = password = authority = null;
        return false;
    }

    public WindowsIdentity ImpersonationUser
    {
        get { return null; }
    }

    public ICredentials NetworkCredentials
    {
        get { return new NetworkCredential("myUserName", "myPassword"); }
    }    
}

I am able to login to "http://mydomain/reports", the default web site of the SSRS, using "myUserName" and "myPassword" (I am not sure if this is related). Still I am getting MissingEndPoint exception at SetParameters() method above. It says:

"The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version."

I am also responsible for configuring the Reporting Services for the necessary configuration for this scenario and I have heard that this issue is related to the config files in SSRS but I have no idea what to write in them. Any help is much appreciated!

Upvotes: 2

Views: 4648

Answers (1)

Bryan
Bryan

Reputation: 17693

The string provided for rprtView.ServerReport.ReportServerUrl should be for the Report Server service, not the Report Manager application.

Change this:

rprtView.ServerReport.ReportServerUrl = new Uri(@"http://mydomain/reports");

to this:

rprtView.ServerReport.ReportServerUrl = new Uri(@"http://mydomain/reportserver");

This page has some high-level info on the Report Manager interface, Report Server web service, and how they relate.

Upvotes: 3

Related Questions