# .NET SDK(\>4.0.0) on .NET Framework WebSocket User-Agent Issue

**URL:** https://community.sendbird.com/t/net-sdk-4-0-0-on-net-framework-websocket-user-agent-issue/11040
**Category:** .Net
**Tags:** chat-sdk, dotnet
**Created:** [June 18, 2025, 5:37am UTC](https://community.sendbird.com/t/net-sdk-4-0-0-on-net-framework-websocket-user-agent-issue/11040 "2025-06-18T05:37:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Chanhun](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@Chanhun](https://community.sendbird.com/u/Chanhun)
#### Post date: [June 18, 2025, 5:37am UTC](https://community.sendbird.com/t/net-sdk-4-0-0-on-net-framework-websocket-user-agent-issue/11040/1 "2025-06-18T05:37:28Z")

</div>

**[Problem/Question]**

When using the Sendbird .NET SDK (version **4.0.1** and later) on **.NET Framework 4.8** , the WebSocket handshake fails with the following exception related to the `User-Agent` header:

```auto
System.ArgumentException: The 'User-Agent' header must be modified using the appropriate property or method. Parameter name: name

```

* * *

**[SDK Version]**

4.0.1 and later (no issue in 4.0.0)

**[Reproduction Steps]**

- Create a .NET Framework 4.8 WPF project.
- Install Sendbird.Chat NuGet package version ≥ 4.0.1.
- Initialize and connect:

```auto
SendbirdChat.Init(new SbInitParams(AppId));
SendbirdChat.Connect(userId, accessToken, (user, error) => { /* … */ });

```

- Observe the exception thrown during the WebSocket handshake.

**[Frequency]**

100% — Every WebSocket connection attempt on .NET Framework 4.8 with SDK ≥ 4.0.1

**[Current impact]**

The SDK fails to initialize, preventing any real-time messaging functionality.

**[Additional Context]**  
This appears to be caused by .NET Framework’s `ClientWebSocketOptions` blocking restricted headers like `User-Agent`. See discussion: :github.com/dotnet/runtime/issues/24822 (reflection-based workarounds are mentioned). We need guidance on any SDK‑level fix or recommended approach to bypass this restriction while continuing to use WebSockets.
