---
title: "Ice.*"
url: https://docs.zeroc.com/ice/3.8/property-reference/ice-properties
language: csharp
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Ice.\*

Programming language: C#. Other languages: [C++](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/cpp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/ruby.md), [Swift](https://docs.zeroc.com/ice/3.8/property-reference/ice-properties/swift.md).

## Ice.BackgroundLocatorCacheUpdates

`Ice.BackgroundLocatorCacheUpdates=num`

If `num` is set to `0` (the default), an invocation on an indirect proxy whose endpoints are older than the configured [locator cache](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients/csharp.md) timeout triggers a locator cache update; the run time delays the invocation until the new endpoints are returned by the locator.

If `num` is set to a value larger than `0`, an invocation on an indirect proxy with expired endpoints still triggers a locator cache update, but the update is performed in the background, and the runtime uses the expired endpoints for the invocation. This avoids delaying the first invocation that follows expiry of a cache entry.

## Ice.BatchAutoFlushSize

`Ice.BatchAutoFlushSize=num` (in KiB)

This property controls how the Ice runtime deals with flushing of [batch messages](https://docs.zeroc.com/ice/3.8/runtime/invocation/invocation-mode/batched-invocations/csharp.md). If `num` is greater than `0`, the runtime automatically forces a flush of the current batch when a new message is added to a batch and that message would cause the batch to reach or exceed `num` KiB (1024 bytes per KiB). For stream transports, `0` disables automatic flushing: the application must flush batches explicitly. If not defined, the default value is `1024`.

For datagram proxies, Ice caps the flush threshold at [Ice.UDP.SndSize](https://docs.zeroc.com/ice/3.8/property-reference/ice-udp-properties/csharp.md) bytes, or 65507 bytes when that property is not set, including when `num` is `0`.

> **Warning**
>
> When flushed, batch requests are sent as a single Ice message. The Ice runtime in the receiver limits incoming messages to [Ice.MessageSizeMax](#ice.messagesizemax), so the sender must flush batch requests, manually or automatically, before they exceed this limit.

## Ice.CacheMessageBuffers

`Ice.CacheMessageBuffers=num`

If `num` is a value greater than `0`, the proxies cache message buffers for future reuse. This can improve performance and reduce the amount of garbage produced by Ice internals that the garbage collector would eventually spend time to reclaim. However, for applications that exchange very large messages, this cache may consume excessive amounts of memory and therefore should be disabled by setting this property to `0`.

The default value is `2`.

> **Note**
>
> This property only affects the caching of message buffers for invocations. The Ice runtime never caches message buffers for dispatches.

## Ice.ClassGraphDepthMax

`Ice.ClassGraphDepthMax=num`

Specifies the maximum depth for a graph of Slice class instances to unmarshal. If this maximum is reached, the Ice runtime throws a `MarshalException`. Reading and destroying a Slice class graph are recursive operations. This property prevents stack overflows from occurring if a sender sends a very large graph and not enough space on the stack is available. To read larger graphs, you can increase the value of this property. If not specified, the default value is `10`.

Setting this property to `0` (or to a negative number) disables the depth limit altogether.

## Ice.Compression.Level

`Ice.Compression.Level=num`

Specifies the bzip2 compression level to use when [compressing protocol messages](https://docs.zeroc.com/ice/3.8/runtime/compression/csharp.md). Values range from `1` to `9`, where `1` represents the fastest compression and `9` represents the best compression. Note that higher levels cause the bzip2 algorithm to devote more resources to the compression effort, and may not result in a significant improvement over lower levels. If not specified, the default value is `1`.

## Ice.Config

```config
Ice.Config=config_file[,config_file,...]
Ice.Config=1
```

This property must be set from the command line with one of the options `--Ice.Config`, `--Ice.Config=1`, or `--Ice.Config=config_file`.

If the `Ice.Config` property is empty or set to `1`, or not set at all, the Ice runtime examines the contents of the [ICE\_CONFIG](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/using-configuration-files/csharp.md) environment variable to retrieve the path names of one or more configuration files. Otherwise, `Ice.Config` must be set to the path names of one or more configuration files, separated by commas (path names can be relative or absolute). Property values are read from each of the configuration files listed.

Configuration files use a simple [syntax](https://docs.zeroc.com/ice/3.8/runtime/properties-and-configuration/configuration-file-syntax.md) consisting of *name*=*value* pairs with support for comments and escaping.

## Ice.ConsoleListener

`Ice.ConsoleListener=num`

When the communicator uses Ice's default trace logger, `1` adds Ice's console listener to `System.Diagnostics.Trace.Listeners`. This listener writes messages to `stderr`. With `0`, the logger continues writing through `System.Diagnostics.Trace` using the existing listeners.

Ice consults this property when no logger is supplied in `InitializationData`, `Ice.LogFile` is empty and the [per-process logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/per-process-logger/csharp.md) is Ice's default logger.

The default value is `1`.

## Ice.HTTPProxyHost

`Ice.HTTPProxyHost=addr`

Specifies the host name or IP address of an HTTP proxy server. If `addr` is not empty, Ice uses the designated HTTP proxy server for all outgoing (client) connections.

## Ice.HTTPProxyPort

`Ice.HTTPProxyPort=num`

The port number of the HTTP proxy server. If not specified, the default value is `1080`.

## Ice.ImplicitContext

`Ice.ImplicitContext=type`

Specifies whether a communicator has an [implicit request context](https://docs.zeroc.com/ice/3.8/runtime/invocation/request-contexts/implicit-request-contexts/csharp.md) and, if so, at what scope the context applies. Legal values for this property are `None` (equivalent to the empty string), `PerThread`, and `Shared`. If not specified, the default value is `None`.

## Ice.InitPlugins

`Ice.InitPlugins=num`

If `num` is a value greater than `0`, the Ice runtime automatically initializes the plug-ins it has loaded. Ice initializes plug-ins in construction order; `InitializationData.pluginFactories` and `Ice.PluginLoadOrder` determine this order. An application may need to set this property to `0` in order to interact directly with a plug-in after it has been loaded but before it is initialized. In this case, the application must invoke `initializePlugins` on the plug-in manager to complete the initialization process. If not defined, the default value is `1`.

## Ice.IPv4

`Ice.IPv4=num`

Specifies whether Ice uses IPv4. If `num` is a value greater than `0`, IPv4 is enabled. If not specified, the default value is `1`.

## Ice.IPv6

`Ice.IPv6=num`

Specifies whether Ice uses IPv6. If `num` is a value greater than `0`, IPv6 is enabled. If not specified, the default value is `1` if the system supports the creation of IPv6 sockets, and `0` otherwise.

## Ice.LogFile

`Ice.LogFile=file`

Selects a file-based [logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/default-logger/csharp.md) for the communicator. The logger appends messages to the specified file and creates the file if necessary. A logger supplied in `InitializationData` takes precedence over this property. The [per-process logger](https://docs.zeroc.com/ice/3.8/administration/logger-facility/per-process-logger/csharp.md) is unchanged.

## Ice.MessageSizeMax

`Ice.MessageSizeMax=num` (in KiB)

Sets the maximum size of an incoming Ice protocol message, in KiB (1024 bytes). The limit applies to the whole message, including the protocol header; for a compressed message, it also applies to the decompressed size. The default value is `1024` (1 MiB).

A value of `0` or less selects the largest supported size; a positive value must be at most 2,097,151 KiB (about 2 GiB).

Ice rejects an incoming message that exceeds this limit and logs a warning when [Ice.Warn.Connections](https://docs.zeroc.com/ice/3.8/property-reference/ice-warn-properties/csharp.md) is set. Over connection-oriented transports, Ice also closes the connection: a client receiving an oversized reply gets a `MarshalException` from its invocation, and a client whose request is oversized gets a `ConnectionLostException`.

See also [adapter.MessageSizeMax](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/csharp.md).

## Ice.PluginLoadOrder

`Ice.PluginLoadOrder=names`

Specifies the order in which Ice creates the plug-ins installed through configuration, with `Ice.Plugin.name` properties. `names` lists plug-in names separated by commas or white space. Ice creates the plug-ins in `names` first, in that order, and then the other plug-ins installed through configuration, in an undefined order.

This property does not affect the plug-ins installed through `InitializationData.pluginFactories`, even when an `Ice.Plugin.name` property supplies their arguments: Ice creates these plug-ins in list order, before any plug-in installed through configuration.

## Ice.PreferIPv6Address

`Ice.PreferIPv6Address=num`

If both IPv4 and IPv6 are enabled (the default), specifies whether Ice prefers IPv6 addresses over IPv4 addresses when resolving hostnames. If `num` is a value greater than `0`, IPv6 addresses are preferred. If not specified, the default value is `0`.

## Ice.PreloadAssemblies

`Ice.PreloadAssemblies=num`

If `num` is set to a value larger than `0`, the Ice runtime will try to load all the assemblies referenced by the process during communicator initialization, otherwise the referenced assemblies will be initialized lazily. The default value is `0`.

## Ice.PrintAdapterReady

`Ice.PrintAdapterReady=num`

If `num` is set to a value larger than `0`, an object adapter prints "*adapter\_name* ready" on standard output after activation is complete. This is useful for scripts that need to wait until an object adapter is ready to be used.

## Ice.PrintProcessId

`Ice.PrintProcessId=num`

If `num` is set to a value larger than `0`, the process ID is printed on standard output upon startup.

## Ice.ProgramName

`Ice.ProgramName=name`

Specifies the program name used for logging. If this property is empty, communicator initialization selects the following default:

| Language | Default |
| --- | --- |
| C++ | `argv[0]` when you create the communicator with `Ice::initialize(argc, argv)`; otherwise the executable's base name on Linux, macOS, and Windows, and an empty string on other platforms. |
| MATLAB | The executable's base name. |
| C# | `AppDomain.CurrentDomain.FriendlyName`. |
| Java and JavaScript | An empty string. |
| Python | The base name of `sys.argv[0]`, when available. |
| Ruby | The base name of `$0`. |
| PHP | The base name of `$_SERVER['SCRIPT_FILENAME']`, when available. |
| Swift | The last path component of `CommandLine.arguments.first`, when available. |

For mappings based on the C++ runtime, an empty language-specific default falls back to the executable's base name on Linux, macOS and Windows. Setting this property to a non-empty value overrides the default.

In C# and Java, Ice also uses this value as a prefix for runtime thread names.

## Ice.RetryIntervals

`Ice.RetryIntervals=num [num ...]`

This property defines the number of times an operation is [automatically retried](https://docs.zeroc.com/ice/3.8/runtime/invocation/automatic-retries/csharp.md) and the delay between each retry. For example, if the property is set to `0 100 500`, the operation is retried 3 times: immediately after the first failure, again after waiting 100ms after the second failure, and again after waiting 500ms after the third failure. The default value (`0`) means Ice retries once immediately. A first value of `-1` disables retries.

## Ice.ServerIdleTime

`Ice.ServerIdleTime=num`

If `num` is set to a value larger than `0`, Ice automatically calls `shutdown` on the communicator when its server thread pool has been idle for `num` seconds. The server thread pool is not idle as long as any of its thread is performing some task, like dispatching a request.

This call to `shutdown` shuts down the communicator's server side and causes any thread waiting on `waitForShutdown` to return. After that, a server will typically do some clean-up work before exiting. The default value is `0`, meaning that the server will not shut down automatically. This property is often used for servers that are automatically [activated by IceGrid](https://docs.zeroc.com/ice/3.8/services/icegrid/icegrid-server-activation.md).

> **Note**
>
> The server idle time takes effect only once all the server thread pool idle threads have been reaped. The thread idle time can be configured with the [ThreadIdleTime](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/csharp.md) thread pool property.

## Ice.SOCKSProxyHost

`Ice.SOCKSProxyHost=addr`

Specifies the host name or IP address of a SOCKS proxy server. If `addr` is not empty, Ice uses the designated SOCKS proxy server for all outgoing (client) connections.

> **Note**
>
> Ice supports the SOCKS4 protocol, which requires IPv4. If both `Ice.SOCKSProxyHost` and `Ice.HTTPProxyHost` are set, Ice uses the SOCKS proxy.

## Ice.SOCKSProxyPort

`Ice.SOCKSProxyPort=num`

The port number of the SOCKS proxy server. If not specified, the default value is `1080`.

## Ice.StdErr

`Ice.StdErr=filename`

If `filename` is not empty, the standard error stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator that is created in a process.

`Ice.StdErr` and `Ice.StdOut` can name the same file.

## Ice.StdOut

`Ice.StdOut=filename`

If `filename` is not empty, the standard output stream of this process is redirected to this file, in append mode. This property is checked only for the first communicator created in a process.

`Ice.StdErr` and `Ice.StdOut` can name the same file.

## Ice.ThreadPriority

`Ice.ThreadPriority=value`

`value` specifies a thread priority. Threads created by the Ice runtime are created with the specified priority by default. Leaving this property unset causes the runtime to create threads with the system default priority. This property is unset by default.

`value` can be `Lowest`, `BelowNormal`, `Normal`, `AboveNormal`, or `Highest`.

The named values can also include the `ThreadPriority.` prefix, for example `ThreadPriority.AboveNormal`.

You can separately override the default priorities for the client and server thread pools using [Ice.ThreadPool.*name*.ThreadPriority](https://docs.zeroc.com/ice/3.8/property-reference/ice-threadpool-properties/csharp.md#ice.threadpool.name.threadpriority) as well as for a specific object adapter using [*adapter*.ThreadPool.ThreadPriority](https://docs.zeroc.com/ice/3.8/property-reference/object-adapter-properties/csharp.md).

## Ice.ToStringMode

`Ice.ToStringMode=string`

`string` must be one of the following: `Unicode`, `ASCII`, `Compat`.

This property maps to an enumerator of [ToStringMode](https://code.zeroc.com/ice/3.8/api/csharp/api/Ice.ToStringMode.html) and controls how `identityToString` and `proxyToString` on the communicator escape non-printable ASCII characters and non-ASCII characters.

The default value is `Unicode`.
