-
Notifications
You must be signed in to change notification settings - Fork 39
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
Can't log exceptions when Request.Form contains XML #12
Comments
To be clear, you're getting this error on the client-side because the browser is posting XML and ASP.NET is rejecting the request, but you want RollbarSharp to pickup these events and report them? Whenever you see that "potentially dangerous" error it usually means that you need to encode something on the client side before sending it to the server. So I think you're on the right track there with client-side encoding. As for Rollbar reporting, I think the problem is that the ASP.NET normal processing pipeline stops short of where you'd be able to report to Rollbar. The solution for that might be to create an ASP.NET Health module. I could think about that... |
Not exactly. I need zoom out a bit... I knew there was an exception happening on the server during an ajax request but I didn't know why it wasn't being logged. To be more specific, it was a simple Object reference not set to an instance of an object error due to some variable being null. This error bubbled up to our server side exception handler, which of course, wants to report to Rollbar (see this code below). So, when I stepped through the code, I found that when it called Does this make it more clear what is going on? I have "caught" a server side exception during an ajax request and I am trying to log it.
|
Getting the popular A potentially dangerous Request.Form value was detected from the client error because
aFilterContext.HttpContext.Request.Form
contains some XML, This is a huge buzz kill because almost all of our requests have XML in them, so we aren't seeing any of our server errors.Any idea how we can get around this? Is my only option to html encode the
Request.Form
XML values on the client before they are even sent? We use MVC so we get around this in our requests by usingValidateInput(false)
as seen here but you can see there are other solutions such as setting the request validation mode to 2.0.The text was updated successfully, but these errors were encountered: