-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(dotnet): add Web.config DSN example for ASP.NET #15876
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
base: master
Are you sure you want to change the base?
docs(dotnet): add Web.config DSN example for ASP.NET #15876
Conversation
|
@fuguiKz is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
Flash0ver
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fuguiKz thank you very much for the PR!
Sorry I didn't notice it earlier (thanks @bitsandfoxes for the ping).
| If you'd prefer not to hardcode your DSN in your source code, you can store it in your `Web.config` file: | ||
|
|
||
| ```xml {filename:Web.config} | ||
| <configuration> | ||
| <appSettings> | ||
| <add key="SentryDsn" value="___PUBLIC_DSN___" /> | ||
| </appSettings> | ||
| </configuration> | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: add short web.config example, without replacing the existing quick-start guide
I do like the example!
But I would prefer if we list the web.config example as an additional alternative to the "default" hardcoded variant.
E.g. before the section ### Capturing the affected user
- add a new sub-section
- e.g.
### Configure via `web.config` file
- e.g.
- insert this text and code snipped in the new sub-section
- insert a short C# snippet consuming the
web.config:
SentrySdk.Init(options =>
{
options.Dsn = ConfigurationManager.AppSettings["SentryDsn"];
});|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thanks for the quick review! It looks like the required Vercel preview is still waiting for team authorization (see the vercel[bot] comment). Could someone from the Sentry team authorize the deployment so the checks can proceed? Happy to adjust anything if you’d like changes. |
Resolves getsentry/sentry-dotnet#4777
Adds a basic
Web.configappSettingssnippet and updates the ASP.NET guide example to read the DSN fromConfigurationManager.AppSettings["SentryDsn"].Urgency: not urgent.