Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable server side logging in SignalR

I'm trying to debug a SignalR connection issue, and while I know how to enable client side logging, I have no idea how to enable server side logging. It doesn't seem to be logging anything to the console.

I've tried using EnableDetailedErrors = true in my HubConfiguration, but that doesn't seem to do anything.

like image 499
Ben Baron Avatar asked May 16 '13 01:05

Ben Baron


1 Answers

I was trying to debug a 500 Internal Server Error response, and couldn't figure out how to enable exception logging. Thanks to David Fowler, the maintainer of SignalR who helped me on IRC, here is how to enable exception reporting:

  1. Install Microsoft.Owin.Diagnostics via NuGet

  2. Add app.UseErrorPage(); before you're calling MapHubs()

Now instead of a 500 error, you'll get a copy of the exception returned.

like image 78
Ben Baron Avatar answered Dec 28 '22 02:12

Ben Baron