---
title: "Put Client Configuration Operation (Server-Wide)"
url: "https://docs.ravendb.net/6.2/client-api/operations/server-wide/configuration/put-serverwide-client-configuration"
version: "6.2"
language: "csharp"
---

# Put Client Configuration Operation (Server-Wide)

> Client language: C#. Also available for [Node.js](https://docs.ravendb.net/6.2/client-api/operations/server-wide/configuration/put-serverwide-client-configuration.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - The server-wide Client-Configuration is a set of configuration options that are set **on the server** and apply to any client when communicating with **any** database in the cluster.  
>   See the available configuration options in the article about [put client-configuration for database](https://docs.ravendb.net/6.2/client-api/operations/maintenance/configuration/put-client-configuration.md#what-can-be-configured).
>
> - To set the server-wide Client-Configuration on the server:
>
>   - Use `PutServerWideClientConfigurationOperation` from the client code.  
>     See the example below.
>
>   - Or, set the server-wide Client-Configuration from the Studio [Client-Configuration view](https://docs.ravendb.net/6.2/studio/server/client-configuration.md).
>
> - A Client-Configuration that is set on the server **overrides** the initial Client-Configuration that is set on the client when creating the Document Store.  
>   A Client-Configuration that is set on the server for the [database level](https://docs.ravendb.net/6.2/client-api/operations/maintenance/configuration/put-client-configuration.md)
>   will **override** the server-wide Client-Configuration for that database.
>
> - Once the Client-Configuration is modified on the server, the running client will [receive the updated settings](https://docs.ravendb.net/6.2/client-api/configuration/load-balance/overview.md#keeping-the-client-topology-up-to-date)
>   the next time it makes a request to the database.
>
> - In this page:
>   - [Put client-configuration (server-wide)](#put-client-configuration-\(server-wide\))
>   - [Syntax](#syntax)

## Put client-configuration (server-wide)

### Sync

```csharp
// Define the client-configuration object
ClientConfiguration clientConfiguration = new ClientConfiguration
{
  MaxNumberOfRequestsPerSession = 100,
  ReadBalanceBehavior = ReadBalanceBehavior.FastestNode
  // ...
};
  
// Define the put server-wide client-configuration operation, pass the configuration 
var putServerWideClientConfigOp = new PutServerWideClientConfigurationOperation(clientConfiguration);

// Execute the operation by passing it to Maintenance.Server.Send
store.Maintenance.Server.Send(putServerWideClientConfigOp);
```

### Async

```csharp
// Define the client-configuration object
ClientConfiguration clientConfiguration = new ClientConfiguration
{
  MaxNumberOfRequestsPerSession = 100,
  ReadBalanceBehavior = ReadBalanceBehavior.FastestNode
  // ...
};
      
// Define the put server-wide client-configuration operation, pass the configuration 
var putServerWideClientConfigOp = new PutServerWideClientConfigurationOperation(clientConfiguration);
  
// Execute the operation by passing it to Maintenance.Server.SendAsync
tore.Maintenance.Server.SendAsync(putServerWideClientConfigOp);
```

## Syntax

```csharp
public PutServerWideClientConfigurationOperation(ClientConfiguration configuration)
```

| Parameter | Type | Description |
| - | - | - |
| **configuration** | `ClientConfiguration` | Client configuration that will be set on the server<br />(server-wide, for all databases) |

```csharp
public class ClientConfiguration
{
  private char? _identityPartsSeparator;
  public long Etag { get; set; }
  public bool Disabled { get; set; }
  public int? MaxNumberOfRequestsPerSession { get; set; }
  public ReadBalanceBehavior? ReadBalanceBehavior { get; set; }
  public LoadBalanceBehavior? LoadBalanceBehavior { get; set; }
  public int? LoadBalancerContextSeed { get; set; }
  public char? IdentityPartsSeparator;  // can be any character except '|'
}
```

## See also

- [Client Configuration View](https://docs.ravendb.net/6.2/studio/server/client-configuration.md)
- [Get client-configuration (server-wide)](https://docs.ravendb.net/6.2/client-api/operations/server-wide/configuration/get-serverwide-client-configuration.md)
- [Get client-configuration (for database)](https://docs.ravendb.net/6.2/client-api/operations/maintenance/configuration/get-client-configuration.md)
- [Put client-configuration (for database)](https://docs.ravendb.net/6.2/client-api/operations/maintenance/configuration/put-client-configuration.md)
