Hi,
I am trying to return a list of Reports from our SSRS Reporting server using C# and Visual Studio 2022.
I have seen many examples on the internet on how to achieve this but non of then work (they are all basically the same).
I have even tried examples form Chat-GPT with no luck.
What I have tried:
I have created a connected service to our Reporting Server and this has generated as Reference Class to use (ReportingService2010Soap).
From here it has been trial and error as nothing I've seen sems to fit the model shown in the examples.
This is some of the code I have tried with no luck..
public static ReportingService2010SoapClient.EndpointConfiguration ReportingService2010Soap { get; set; }
static void Main(string[] args)
{
var reportServerUrl = "http://<Reporting ServerName & Port>/<RootFolder>/ReportService2010.asmx";
var credentials = new NetworkCredential("<Domain UserName>", "<Domain Password>", "<Domain Name>");
try
{
ReportingService2010SoapClient client = new ReportingService2010SoapClient(ReportingService2010Soap, reportServerUrl);
client.Endpoint.Address = new System.ServiceModel.EndpointAddress(reportServerUrl);
client.ClientCredentials.Windows.ClientCredential = credentials;
Console.ReadLine();
}
Hopefully someone can assist with an example that works, or documentation that is correct for VS2022 and Connected Service References.
Regards
Peter.