Skip to content

Commit 90d1aa3

Browse files
authored
docs(dotnet): add Proxy Server troubleshooting (#13438)
1 parent 2c5e0f2 commit 90d1aa3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/platforms/dotnet/common/troubleshooting.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,26 @@ If you're working with obfuscated code, you have several options:
7979

8080
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.
8181

82+
## Proxy Server
83+
84+
Often, your server can only access the internet through a proxy server.
85+
If that's the case, make sure your proxy server is configured so the `HttpClient`
86+
used by Sentry's SDK can pick it up.
87+
88+
```csharp
89+
(SentryOptions options) =>
90+
{
91+
// Read the proxy's address from, for example, your Configuration
92+
options.HttpProxy = new WebProxy(new Uri("http://proxyserver:80/"));
93+
};
94+
```
95+
96+
Alternatively, you may configure the default proxy that all `HttpClient` instances use if no proxy is set explicitly.
97+
98+
```csharp
99+
System.Net.Http.HttpClient.DefaultProxy = new WebProxy(new Uri("http://proxyserver:80/"));
100+
```
101+
102+
For more information, see the [HttpClient.DefaultProxy Property](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient.defaultproxy).
103+
82104
<PlatformContent includePath="troubleshooting" />

0 commit comments

Comments
 (0)