diff --git a/docs/platforms/dotnet/common/troubleshooting.mdx b/docs/platforms/dotnet/common/troubleshooting.mdx index 7096d9e997ffa..a6092fd9e63b6 100644 --- a/docs/platforms/dotnet/common/troubleshooting.mdx +++ b/docs/platforms/dotnet/common/troubleshooting.mdx @@ -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). +