ImageVault 5 Configurations
ImageVault 5 configurations are modified by editing the web.config file and the appsettings.json file (from v5.25). This page contains all configuration values set in web.config. To see configuration options for appsettings.json, see the appsettings json page.
Generic Application Settings
All application settings for ImageVault utilizes the iv: prefix.
Example:
<appSettings>
<add key="iv:cachePrefix" value="pf1_"/>
</appSettings>
iv:cachePrefix
If you would like to utilize the same cache instance (like Redis) for multiple installations, then you can set this key to add a prefix that should be applied to all out of process cache keys.
<add key="iv:cachePrefix" value="pf1_"/>
iv:readOnly
If this setting is set to "true" then the ImageVault application is set in a Read-only mode. This indicates that no data will be written to the database. Since ImageVault needs to modify the data in the database, the application cannot perform all functions correctly while in this mode. It will still serve converted media but, for example, it cannot create new conversions on existing data.
iv:setupEnabledForNonAdmins
Normally the /setup page is restricted to Administrators only. You can override this behavior by setting this configuration to true. If, for example, you managed to erase the admin user and would like to create a new one, this is one way to do it.
iv:identityPrefix
If you have multiple ImageVaults that uses different user catalogs you can set the identity prefix to a value that will be prefixed all user and group identities to guarantee uniqueness between users and groups. You configure the identity prefix in the ImageVault UI application and NOT on the client.
iv:legacyUsernameIsValidIdentifier
In ImageVault 4, the name of the user was a valid identifier and was registered in the database. In ImageVault 5 every user is identified by its user id (which is a guid). If you have an upgraded installation, you might want to activate this until you have fixed all user rights that was created using the username. Set this to true to include the username as an identifier as per ImageVault 4.
iv:mediaExpireMinutes
As default, media assets delivered by ImageVault will be cached where appropriate and media will be marked as to expire after one year. Using this directive, you can set the number of minutes a media asset will be valid before expiring. This will be reflected in the HTTP response headers Cache-Control (max-age) and Expires.
<add key="iv:mediaExpireMinutes" value="10"/>
iv:securityProtocolType
When ImageVault communicates with an external service using SSL, this configuration can set the security protocol type that we allow. As default we allow SSL3.0, TLS 1.0 and TLS 1.2. To change this, set this configuration to a value that combines all numerical values of the protocols that you would like to allow. The following table shows the different values
Protocol | Value |
---|---|
SSL 2.0 | 12 |
SSL 3.0 | 48 |
TLS 1.0 | 192 |
TLS 1.1 | 768 |
TLS 1.2 | 3072 |
As default, we use the value 3312 that enables SSL 3.0, TLS 1.0 and TLS 1.2
See more information about security protocol type at the MSDN page https://msdn.microsoft.com/en-us/library/system.net.securityprotocoltype
iv:searchPageSize
Sets the number of items that each requests retrieves for the ImageVault UI PhotoStream. Default is 50.
iv:databaseCommandTimeout
The number of seconds before a SQL command is aborted if not completed. Only valid for Database upgrade commands. Default value is 3600.
iv:disableJobEngine
If true, the Scheduled job engine is disabled. Default is false.
iv:trashcanDeleteThresholdSeconds
Version 5.8
Deleted items are kept in a trashcan before being removed completely from the system. This configuration sets the number of seconds that the items are kept in the trashcan before being deleted permanently.
Default value is set to 30 days (2592000 seconds).
iv:enableXmpAnalysis
Version 5.8
Xmp analysis is included as a feature toggled component that can be activated by setting this configuration value to true. As default the analyser will import metadata from the following namespaces. For more information about namespaces you can consult the XMP specification.
Namespace | Uri |
---|---|
Basic | http://ns.adobe.com/xap/1.0/ |
Dublin Core | http://purl.org/dc/elements/1.1/ |
ImageVault Basic | http://imagevault.se/xmp/1.0/ |
ImageVault Core | http://imagevault.se/xmp/1.0/core/ |
You can modify this list by modifying the imagevault.core/metadata/xmp node in the web.config file.
<configuration>
<imagevault.core>
<metadata>
<xmp>
<xmlNamespaces>
<add name="http://ns.xinet.com/ns/xinetschema#"/>
<remove name="http://imagevault.se/xmp/1.0/core/"/>
</xmlNamespaces>
</xmp>
</metadata>
</imagevault.core>
</configuration>
The xmlNamespaces element allows the following child elements
Element | Description |
---|---|
add | Adds the namespace in the name attribute |
remove | Removes the namespace in the name attribute |
clear | Clears the list of attributes |
iv:oAuthRefreshTokenExpirationHours
Version 5.12
When a client application uses oauth for authentication, refresh tokens are issued that allows a user to get access to the API without need to login again. These refresh tokens have a default expiration set to 7 days (24h in ImageVault 5.11 or earlier). Using this configuration you can specify the number of hours a refresh token is valid before the user needs to log in again.
Valid values are from 1 hour and up.
iv:securityManagerFactoryConfiguration
Version 5.18
Alternative way to configure security manager configuration using application settings instead of database or configuration string. Syntax for value is a JSON formatted string (html encoded of course) with two properties, Type and Configuration. Represents the same JSON as the database configuration setting or when compared to the configuration string, the Type represents the providerType attribute and the Configuration represents the connection string (or a JSON representation of the configuration (depending on what the Security manager type expects)).
<add key="iv:securityManagerFactoryConfiguration" value="{Type:"ImageVault.Adal.Providers.AdalSecurityManager,ImageVault.Adal.Providers",Configuration:"Tenant=7560D15F-E196-4DA5-8EC6-CFD84662A619;ClientId=DF5AAC9E-E8BA-467C-BD7F-918203B8E645;AppKey=eVX6Vu8Kr8rvRJ7lBsn16I3E"}"
iv:disablePdfTransparencyForJpeg
Version 5.21
Removes transparency information when converting PDF files into JPEG format.
The default value is "false".
iv:searchIndexBatchSize
Version 5.22
Changes the default batch size when updating the asset search index. If problems related to search index request entity too large occurs, lower this value and try again. Default value is 250 assets.
<add key="iv:searchIndexBatchSize" value="10"/>
Application Insights
Application Insights (AI) is a service that can receive logging/performance details from an ImageVault instance. To activate application insights, add an applicationinsights.config in the web root folder with a suitable configuration. The Application Insights connection string must be present to send logging to AI. Then two modules must be present in web.config in the /configuration/system.webServer/modules section.
<add name="TelemetryCorrelationHttpModule"
type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation"
preCondition="integratedMode,managedHandler"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
preCondition="managedHandler"/>
You can also customize the logging further using a set of application settings.
iv:applicationInsightsDeveloperMode
When using AI, entries are buffered and not sent immediately to the AI instance (once per minute). If developer mode is activated, entries are sent immediately. This can reduce performance in production.
iv:applicationInsightsDisabled
Application insights is enabled if you enter an Application Insights connection string. If you would like to disable it without clearing the Application Insights connection string, set the disabled value to true.
iv:applicationInsightsEnableProfiling
Enables profiling for ImageVault and sends detailed profiling data to AI.
ThreadPool settings
As long as the thread pool has spawned less threads than stated as minimum number of threads, the
execution is fast. When the number of busy threads exceeds this number every additional
thread to spawn is delayed for ~500 ms, which may results in timeouts of ongoing Redis operations.
iv:threadPoolMinWorkers
An integer, greater than 0, that sets the minimum amount of worker threads of the applications
threadpool.
iv:threadPoolMinIocp
An integer, greater than 0, that sets the minimum amount of IOCP threads (asynchronous IO threads)
of the applications thread pool.
Client application settings
We also have some settings that can be set on a client (like ImageVault for Episerver) to modify the client settings accordingly.
iv:externalUrl
This url refers to the public ImageVault url that the user should be redirected to when accessing any ImageVault assets. This can be the url to the ImageVault site, or if a CDN is in front of the ImageVault site, the url to the endpoint in the CDN that the ImageVault site uses.
Note
If you only would like to place the published media behind a CDN, use the defaultPublishedMediaUrlBase configuration instead.
iv:internalUrl
This url is the url to the ImageVault site that the Client (from the websites point of view) should use to communicate with ImageVault.
CDN Example
You have an Episerver site that is running the ImageVault plugin/client and an ImageVault site that it should connect to. Both sites are behind a CDN and have one url to the CDN and one to the actual site. The ImageVault client on the Episerver site needs to communicate with the ImageVault site and in this case that communication should not go though the cdn in front of ImageVault. You then enter the address that refers to the actual ImageVault site as the iv:internalUrl.
iv:defaultEmbedRendererOptions
Version 6.33
Use this configuration to apply default options to the embed renderer. The options are applied as default to the RenderContext when rendering embeds. This will be overridden by any options set in the media item or passed to the embed renderer as query parameters.
<add key="iv:defaultEmbedRendererOptions" value="defaultQuality=1000"/>
Connection strings
The following connection strings are used by ImageVault
Database
This is the connection string to the ImageVault database.
AzureStorage
This is the connection string to the Azure Storage Account used by the Azure Platform Provider and the Azure Blob Media Storage.
RedisCache
This is the connection string to the Redis instance used by the RedisObjectCache