Skip to main content

Report and Dashboard Server Authentication

  • 3 minutes to read

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.

  • GuestConnectionProvider - used to connect to a Report and Dashboard Server as a guest. This connection provider uses the special Guest account. Make sure that this account is activated on the server if you want your client application to use the guest authentication. For more information on managing user accounts, refer to the Manage User Accounts and Grant Security Permissions topic.
  • ServerUserConnectionProvider - used to connect to a Report and Dashboard Server as a registered user, by providing the user name and password.
  • WindowsUserConnectionProvider - used to connect to a Report and Dashboard Server as a registered user using the integrated Windows authentication.

All connection providers expose the following methods used to establish connection to a Report and Dashboard Server.

  • LoginAsync - asynchronously login to a Report and Dashboard Server.
  • CreateClient - initialize a report service client within the current login session, established by calling the LoginAsync method.
  • ConnectAsync - asynchronously login to a Report and Dashboard Server and initialize a Report and Dashboard Server client within the current login session. This method combines the functionality of the LoginAsync and CreateClient methods.

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.