Exception in ASP.Net RaygunRequestMessageBuilder.cs for blank HTTP Server Headers
Alec
Posted on
Jun 18 2015
I attached Raygun to a WCF exception handler which leaves HttpContext with a number of entries that are present but blank vs being null or not present at all. Consequently Raygun is crashing on send inside of RaygunRequestMessageBuilder.cs -> ToDictionary (for the request.serverVariables collection)
I was able to workaround by excluding all the blank entries like this:
.IgnoreServerVariableNames("AUTHTYPE", "AUTHUSER", "AUTHPASSWORD", "LOGONUSER", "REMOTEUSER", "CERTCOOKIE", "CERTFLAGS", "CERTISSUER", "CERTKEYSIZE", "CERTSECRETKEYSIZE", "CERTSERIALNUMBER", "CERTSERVERISSUER", "CERTSERVERSUBJECT", "CERTSUBJECT", "HTTPSKEYSIZE", "HTTPSSECRETKEYSIZE", "HTTPSSERVERISSUER", "HTTPSSERVERSUBJECT", "PATHINFO", "PATHTRANSLATED", "QUERYSTRING", "SCRIPTNAME", "URL");
This took quite a few hours to debug and workaround. Hoping it can be fixed in a future version. I verified it's still present in 5.0.2 on NuGet. Thanks!
Jason Fauchelle
Raygun
Posted on
Jun 18 2015
Hi Alec,
Thanks for pointing this out and sorry for the trouble. I will look into this for the next version and get back to you when it's available.
-Jason Fauchelle
Jason Fauchelle
Raygun
Posted on
Jun 24 2015
Hi Alec,
We've just released version 5.1.0 of Raygun4Net which is available right now from NuGet. This now catches exceptions that may occur when attempting to retrieve information about the request - such as the server variables. By updating to the latest version, you won't need to blacklist all the troublesome variables any more.
Please let me know if you have further questions about this.
-Jason Fauchelle