Class ClientConfigurationSection
The main Client configuration section that is used to configure the client
Inherited Members
Namespace: ImageVault.Client.Configuration
Assembly: ImageVault.Client.dll
Syntax
public class ClientConfigurationSection : ConfigurationSectionWithAppSettingsBase
Examples
To configure the client to connect to the core service you need the core address and an application identity (aka. sdkIdentity) A standard client configuration looks like below.
Constructors
ClientConfigurationSection()
Initializes a new instance of the ClientConfigurationSection class.
Declaration
public ClientConfigurationSection()
Fields
DefaultMediaUrlBaseName
The name of the appsettings key for the defaultMediaUrlBase setting.
Declaration
public const string DefaultMediaUrlBaseName = "defaultMediaUrlBase"
Field Value
Type | Description |
---|---|
System.String |
DefaultPublishedMediaUrlBaseName
The name of the appsettings key for the defaultPublishedMediaUrlBase setting.
Declaration
public const string DefaultPublishedMediaUrlBaseName = "defaultPublishedMediaUrlBase"
Field Value
Type | Description |
---|---|
System.String |
DisableMediaProxyHandlerName
The name of the appsettings key for the disableMediaProxyHandler setting.
Declaration
public const string DisableMediaProxyHandlerName = "disableMediaProxyHandler"
Field Value
Type | Description |
---|---|
System.String |
EnableClientCacheName
The name of the appsettings key for the enableClientCache setting.
Declaration
public const string EnableClientCacheName = "enableClientCache"
Field Value
Type | Description |
---|---|
System.String |
IgnoreMissingImageVaultDefaultRootCertificateName
Gets the IgnoreMissingImageVaultDefaultRootCertificateName of the ClientConfigurationSection
Declaration
public const string IgnoreMissingImageVaultDefaultRootCertificateName = "ignoreMissingImageVaultDefaultRootCertificate"
Field Value
Type | Description |
---|---|
System.String |
ImageVaultUiUrlName
The name of the appsettings key for the imageVaultUiUrl setting.
Declaration
public const string ImageVaultUiUrlName = "imageVaultUiUrl"
Field Value
Type | Description |
---|---|
System.String |
Properties
Authentication
Gets the Authentication of the ClientConfigurationSection
Declaration
public AuthenticationConfigurationElement Authentication { get; }
Property Value
Type | Description |
---|---|
AuthenticationConfigurationElement |
ClientCache
Controls the client cache
Declaration
public ClientCacheTypeCollection ClientCache { get; set; }
Property Value
Type | Description |
---|---|
ClientCacheTypeCollection |
DefaultMediaUrlBase
Get/Sets the DefaultMediaUrlBase of the ClientConfigurationSection
Declaration
public string DefaultMediaUrlBase { get; set; }
Property Value
Type | Description |
---|---|
System.String | Is used to direct the client to use urls from a specific media proxy |
DefaultPublishedMediaUrlBase
Get/Sets the media url base that is used for all published media requests
Declaration
public string DefaultPublishedMediaUrlBase { get; set; }
Property Value
Type | Description |
---|---|
System.String |
EnableClientCache
Get/Sets the EnableClientCache of the ClientConfigurationSection
Declaration
public bool EnableClientCache { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This value is only used if no ClientCache section is present.
IgnoreMissingImageVaultDefaultRootCertificate
Get/Sets the IgnoreMissingImageVaultDefaultRootCertificate value
Declaration
public bool IgnoreMissingImageVaultDefaultRootCertificate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If set to true, all requests to SSL protected resources that are using a certificate issued by the ImageVault installation, will be considered ok, even if the issuer certificate is not trusted by the client computer. Default value is true. |
Remarks
This will override the System.Net.ServicePointManager.ServerCertificateValidationCallback so if you use this in your code, be sure to honor the present callback.
If you want to disable this behavior, then set this before instancing the Client.
ImageVaultCore
Gets the ImageVaultCore of the ClientConfigurationSection
Declaration
public ImageVaultCoreConfigurationElement ImageVaultCore { get; }
Property Value
Type | Description |
---|---|
ImageVaultCoreConfigurationElement |
Remarks
If using a https address, you can ommit the certificate
ImageVaultUiUrl
Get/Sets the ImageVaultUiUrl of the ClientConfigurationSection
Declaration
public string ImageVaultUiUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Instance
Returns the singleton instance of the ClientConfigurationSection class.
Declaration
public static ClientConfigurationSection Instance { get; set; }
Property Value
Type | Description |
---|---|
ClientConfigurationSection | Set to null to force reload of configuration value |
Methods
ReadFromXmlFile(String)
Reads the configuration from a configuration file
Declaration
public static ClientConfigurationSection ReadFromXmlFile(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename |
Returns
Type | Description |
---|---|
ClientConfigurationSection |
Remarks
Can read both a fragment xml or a full xml document
SaveToXmlFile(String)
Saves the configuration file to disc
Declaration
public void SaveToXmlFile(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename |
ToOptions()
Creates an options item for the section
Declaration
public ImageVaultClientOptions ToOptions()
Returns
Type | Description |
---|---|
ImageVaultClientOptions |