Open jasekiw opened 1 year ago
Assigning to @getsentry/support for routing, due by (sfo). ⏲️
Routing to @getsentry/owners-native for triage, due by (vie). ⏲️
Routing to @getsentry/team-web-sdk-backend for triage, due by (sfo). ⏲️
Routing to @getsentry/team-mobile for triage, due by (sfo). ⏲️
Thanks for letting us know about this. I'll investigate and see what the best path forward is here.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
@mattjohnsonpint Can you make sure this issue gets a status so that github actions doesn't automatically close it?
Core or SDK?
Platform/SDK
Which part? Which one?
ASP.NET
Description
Documentation can be found here: https://docs.sentry.io/platforms/dotnet/guides/aspnet/
This page does not mention that this setup stops working when custom errors is turned on in the web.config. example:
This is because Application_Error in Galobal.asax.cs does not get called when customErrors is turned on.
Here is a stack overflow post describing the issue here: https://stackoverflow.com/questions/6508415/application-error-not-firing-when-customerrors-on/9572858#9572858
This is a very common way to setup error handling in
Suggested Solution
My solution was to turn off customErrors and implement it at a lower level as described by this article that the stack overflow post links: https://kitsula.com/Article/MVC-Custom-Error-Pages
This way the Application_Error method is stilled called and the error pages are still presented via razor pages without doing a redirect.
My end configuration looked like this:
A small writeup in this documentation section should be written to describe the problem and the possible solutions that the user would want to use. I think the solution I used is good while preventing 302 redirects.