Class IronPdfConnectionConfiguration
Custom remote connection configuration, for a client-server model
Inheritance
Namespace: IronPdf.GrpcLayer
Assembly: IronPdf.dll
Syntax
public class IronPdfConnectionConfiguration : Object
Constructors
IronPdfConnectionConfiguration()
Declaration
public IronPdfConnectionConfiguration()
Properties
ConnectionType
The nature of the client-to-host connection (e.g. executable, Docker, remote, etc.)
Declaration
public IronPdfConnectionType ConnectionType { get; set; }
Property Value
| Type | Description |
|---|---|
| IronPdfConnectionType |
CustomChannel
Custom gRPC Channel Grpc.Core.ChannelBase You can create a channel by either create a new Grpc.Core.Channel object or using Grpc.Net.Client.GrpcChannel.ForAddress(System.String) or else to custom your own gRPC channel
Declaration
public ChannelBase CustomChannel { get; set; }
Property Value
| Type | Description |
|---|---|
| Grpc.Core.ChannelBase |
Remarks
Setting CustomChannel will cause any configuration in this object (IronPdfConnectionConfiguration) to be ignored, except for Metadata
Docker
Default configuration for connecting to IronPdfEngine docker host service with a docker network service name ironpdfengine
Declaration
public static IronPdfConnectionConfiguration Docker { get; }
Property Value
| Type | Description |
|---|---|
| IronPdfConnectionConfiguration |
Executable
Default configuration for connecting to IronPdfEngine local service executable
Declaration
public static IronPdfConnectionConfiguration Executable { get; }
Property Value
| Type | Description |
|---|---|
| IronPdfConnectionConfiguration |
Host
Hostname or IP address
Declaration
public string Host { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
LicenseKey
License key
Declaration
public string LicenseKey { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Metadata
Custom Grpc.Core.Metadata that will be sent with each gRPC request.
Declaration
public Metadata Metadata { get; set; }
Property Value
| Type | Description |
|---|---|
| Grpc.Core.Metadata |
Port
Host port
Declaration
public int Port { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
NetFrameworkChannel(String, Metadata)
For .Net Framework project. Install Grpc.Core nuget package. and use this method.
Using this custom gRPC Channel Grpc.Core.ChannelBase for .Net Framework project.
Since gRPC work differently in .Net Framework project.
If this not working, please try remove http:// or https:// prefix in the address.
Or try to create your own Grpc.Core.ChannelBase object and use WithCustomChannel(ChannelBase, Metadata)
Declaration
public static IronPdfConnectionConfiguration NetFrameworkChannel(string address, Metadata metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | address | Example: 123.456.7.8:80 |
| Grpc.Core.Metadata | metadata |
Returns
| Type | Description |
|---|---|
| IronPdfConnectionConfiguration |
RemoteServer(String, Metadata)
Custom configuration for connecting to IronPdfEngine remote server
Declaration
public static IronPdfConnectionConfiguration RemoteServer(string address, Metadata metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | address | Example: https://grpc.myironpdfengine.com |
| Grpc.Core.Metadata | metadata |
Returns
| Type | Description |
|---|---|
| IronPdfConnectionConfiguration |
WithCustomChannel(ChannelBase, Metadata)
Using your custom gRPC Channel Grpc.Core.ChannelBase
You can create a channel by either create a new Grpc.Core.Channel object or using Grpc.Net.Client.GrpcChannel.ForAddress(System.String) or else to custom your own gRPC channel
Declaration
public static IronPdfConnectionConfiguration WithCustomChannel(ChannelBase customChannel, Metadata metadata = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Grpc.Core.ChannelBase | customChannel | Custom gRPC Channel Grpc.Core.ChannelBase |
| Grpc.Core.Metadata | metadata |
Returns
| Type | Description |
|---|---|
| IronPdfConnectionConfiguration |