New to Telerik Reporting? Start a free 30-day trial

Class for creating a connection string that will be used with a REST service instance

Definition

Namespace:Telerik.ReportViewer.Common

Assembly:Telerik.ReportViewer.WinForms.dll

Syntax:

C#
public class RestServiceConnectionInfo : RemoteConnectionInfo

Inheritance: objectReportEngineConnectionInfoBaseRemoteConnectionInfoRestServiceConnectionInfo

Inherited Members RemoteConnectionInfo.UriRemoteConnectionInfo.TimeoutRemoteConnectionInfo.KeepClientAliveReportEngineConnectionInfoBase.ToString()ReportEngineConnectionInfoBase.ConnectionStringReportEngineConnectionInfoBase.Engine...

Example:

cs
private void SetRestServiceReportEngineConnection(object sender, System.EventArgs e)
{
    this.reportViewer1.ReportEngineConnection = new Telerik.ReportViewer.Common.RestServiceConnectionInfo("http://servicehost:83/api/reports", "authToken", 20).ConnectionString;
}
vb
Private Sub SetRestServiceReportEngineConnection(sender As Object, e As System.EventArgs)
    Me.ReportViewer1.ReportEngineConnection = New Telerik.ReportViewer.Common.RestServiceConnectionInfo("http://servicehost:83/api/reports", "authToken", 20).ConnectionString
End Sub 

Constructors

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, bool useDefaultCredentials)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

useDefaultCredentialsbool

Determines if the default credentials will be sent

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, int timeout)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

timeoutint

The timeout for rendering a document measured in seconds

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, string token, bool useDefaultCredentials, int timeout, bool keepClientAlive)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

tokenstring

Authentication token to be sent with each request

useDefaultCredentialsbool

Determines if the default credentials will be sent

timeoutint

The timeout for rendering a document measured in seconds

keepClientAlivebool

Determines if the client will be kept alive (will not be expired)

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, string token, bool useDefaultCredentials, int timeout)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

tokenstring

Authentication token to be sent with each request

useDefaultCredentialsbool

Determines if the default credentials will be sent

timeoutint

The timeout for rendering a document measured in seconds

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, string token, bool useDefaultCredentials)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

tokenstring

Authentication token to be sent with each request

useDefaultCredentialsbool

Determines if the default credentials will be sent

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, string token, int timeout)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

tokenstring

Authentication token to be sent with each request

timeoutint

The timeout for rendering a document measured in seconds

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri, string token)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

tokenstring

Authentication token to be sent with each request

Class for creating a connection string that will be used with a REST service instance

C#
public RestServiceConnectionInfo(string uri)
Parameters:uristring

The URI of /api/reports endpoint the REST service. Example: http://localhost:58619/api/reports

Properties

Token

string

Gets or sets authentication token

C#
public string Token { get; set; }

Determines if the default credentials to be set when connecting to report engine

C#
public bool UseDefaultCredentials { get; set; }