reportserver-17640-configuration-and-api-report-and-dashboard-server-authentication.md
This document describes the application programming interface (API) that you can use to connect to a Report and Dashboard Server from a custom application under any platform. After the connection is established, the application can utilize the provided client-side API to communicate with a Report and Dashboard Server and perform various report managing and publishing operations.
To establish connection to a Report and Dashboard Server, use one of the following connection providers, depending on the required authentication method.
All connection providers expose the following methods used to establish connection to a Report and Dashboard Server.
As the result of executing the CreateClient and the ConnectAsync methods, a ReportServerClient is created, providing methods for client-server interaction with a Report and Dashboard Server.
The following code sample demonstrates how you can use the described API to login to a local Report and Dashboard Server as a guest user.
using DevExpress.ReportServer.ServiceModel.Client;
using DevExpress.ReportServer.ServiceModel.ConnectionProviders;
using DevExpress.ReportServer.ServiceModel.DataContracts;
// ...
// Create a connection provider.
ConnectionProvider connection = new GuestConnectionProvider("http://127.0.0.1:83");
// Initialize a Report and Dashboard Server client.
IReportServerClient client = connection.ConnectAsync().Result;
// Place your code here to interact with the a report service using the created client.
Imports DevExpress.ReportServer.ServiceModel.Client
Imports DevExpress.ReportServer.ServiceModel.ConnectionProviders
Imports DevExpress.ReportServer.ServiceModel.DataContracts
' ...
' Create a connection provider.
Private connection As ConnectionProvider = New GuestConnectionProvider("http://127.0.0.1:83")
' Initialize a Report and Dashboard Server client.
Private client As IReportServerClient = connection.ConnectAsync().Result
' Place your code here to interact with the a report service using the created client.