Configuration
Wisej.Core.Configuration
Last updated
Wisej.Core.Configuration
Last updated
Namespace: Wisej.Core
Assembly: Wisej.Framework (3.1.0.0)
Wisej configuration settings.
Creates a new instance from the specified json string.
Name | Type | Description |
---|---|---|
String[]: List of allowed Url routes separated by a semicolon. i.e.: "api;product;log/performance".
Boolean: When true, the application is automatically reloaded when the session expires or Exit is called.
The application can always override this feature by changing the Wisej.onExit method using a script.
String: The custom function used to validate the browser. If it returns false the browser is not supported and Wisej redirects to NotSupportedUrl.
String: Returns the culture set at the application's level. It can be any of the supported cultures or the keyword "auto", in which case we will detect the culture from the browser.
Boolean: Enabled/disables debug mode.
Boolean: When true, the client will not be able to access the application's controls using the object model registered with javascript under the "App" namespace.
Boolean: When true, the client drops all "execute" events triggered while there is a pending request.
String: Cache-Control for embedded resources. The default is "browser" to cache the embedded resources on the browser for 1 month. Other allowed vaues are: - "server" to cache the resources on the server using the ETag header - "private, max-age=..." to use set the standard Cache-Control header - any value Cache-Control string value.
Boolean: Enables the PWA installation of the application.
Boolean: Enabled/disables the WebSocket protocol.
Boolean: Enabled/disables gzip compression when using the WebSocket protocol.
String: The full path of the configuration file.
Boolean: Enables impersonation mode.
When set to true and windows authentication is configured in web.config, every request thread and application tasks started using Application.StartTask will impersonate the current user.
Int32: The keep-alive interval in seconds.
Int32: The ajax loader timeout in milliseconds.
String: Full name of the first window created automatically at startup.
Int32: Returns the maximum number of nested modal loops.
Int32: Returns the maximum number of active sessions before redirecting to NotAvailableUrl.
Int32: Network check interval in milliseconds. The default is 1000 (1 second). If this value is set, Wisej will send a /healthcheck.wx request at the specified interval when the application goes offline.
String: The URL of the page to load when the server cannot respond to the request.
String: The URL of the page to load when the client browser is not supported.
String: The URL of the page to load when the connection is lost.
Object: Native client-side platform options.
Int32: Polling interval in milliseconds. The default is zero (disabled). If this value is set, the polling starts when the application is loaded.
The polling interval determines the frequency of the automatic poll requests coming from the client when a WebSocket connection is not available. When the client is connected using a WebSocket channel, this value is ignored. An application that wants to enable automatic client updates in absence of a WebSocket connection can set this value, or it can call StartPolling and EndPolling to start and terminate the automatic polling from the client. Both methods are ignored when the client is using a WebSocket connection.
Int32: The timeout for the server to respond to a wisej request in seconds.
String: Returns the rightToLeft mode. It can be "true", "false", or "auto". When set to "auto" the RightToLeft layout is enabled automatically using the current language. The default is "auto".
Boolean: Forces the client to switch to a secure connection (HTTPS and WSS).
String: Where to save the session id on the client. The default is "session" to indicate the browser's sessionStorage. It can be changed to "local" to indicate the browser's localStorage.
Int32: The session timeout in seconds. The timeout is enforced on the client side.
Object: Application settings.
Boolean: Shows the loader animated gif while initializing the application.
String: The startup Main method.
String: Theme name.
Object: ThreadPool min/max configuration, null by default.
String: Url redirection.
Boolean: Verifies the client fingerprint when retrieving a session. It prevents session hijacking over unsecured connections.
Loads or retrieves the configuration file.
Returns: Configuration.
LoadConfigurationEventHandler Fired when the system needs to load a Wisej configuration file.
An application can install a custom configuration handler and return a custom Configuration object. This is a static event and should be attached to before the application starts. One way to do that is to register an HttpModul with IIS, or a middleware for .NET Core, and attach to the event there.
Parameter | Type | Description |
---|---|---|
filePath
The full path to the .json file to load.
json
The json string that defines the configuration values.