Skip to content

docs(dotnet): add Proxy Server troubleshooting #13438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/platforms/dotnet/common/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,26 @@ If you're working with obfuscated code, you have several options:

3. **Contribute to Symbolic**: [Our symbolication library is open source](https://github.com/getsentry/symbolic). You could create a ticket to discuss adding support to it with the maintainers.

## Proxy Server

Often, your server can only access the internet through a proxy server.
If that's the case, make sure your proxy server is configured so the `HttpClient`
used by Sentry's SDK can pick it up.

```csharp
(SentryOptions options) =>
{
// Read the proxy's address from, for example, your Configuration
options.HttpProxy = new WebProxy(new Uri("http://proxyserver:80/"));
};
```

Alternatively, you may configure the default proxy that all `HttpClient` instances use if no proxy is set explicitly.

```csharp
System.Net.Http.HttpClient.DefaultProxy = new WebProxy(new Uri("http://proxyserver:80/"));
```

For more information, see the [HttpClient.DefaultProxy Property](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy).

<PlatformContent includePath="troubleshooting" />