This documentation is for the ASP.NET Core MVC library. You can find out other libraries here.

This library will report all unhandled ASP.NET and MVC exceptions. It can also report if something goes too slow or if there are too many authentication failures.


You should also have installed and configured the ASP.NET Core MVC nuget library.

Customization options

There are some additional customization options to those above, that you can use in Coderr. Below we show how to track invalid model states, track slow requests, track authentication failures, report JavaScript errors and understand the included context collections in Coderr and ASP.NET.

If you are using Coderr Live, you can also configure the prioritization feature.

Tracking invalid model states

Invalid model states is a good indication of the quality of your user interface for reporting errors. If many of the users fail to submit forms properly, it clearly shows that they either don't know what they should enter, the forms are unclear or a combination thereof.

To activate invalid model states, simply add:


You will now get one incident reported per invalid form as shown below.

The collection itself contains the fields that was invalid as this:

Tracking slow requests

Slow requests decrease the overall user experience. Coderr allows you to set the threshold for how long a request may take.

This is useful if you want to ensure that the application is responsive enough, whilst not doing performance monitoring.

To set a timing threshold, add the following configuration with your time limit:

var maxTime = TimeSpan.FromMilliseconds(500);

Tracking authentication failures

Coderr can track all failed authentication attempts. If activated, this feature will report all requests with the Authorization header when getting a 401 as a response. Learn more about HTTP authentication.

To activate tracking authentication failures, use the following line:


The example below shows how authentication failures are reported:

Report JavaScript errors

The ASP.NET Core MVC library can report JavaScript errors. Simply activate this feature, by including the built in script in your _Layout.cshtml like this:

<script src="/coderr/js/"></script>

Now all unhandled JavaScript errors will be reported to Coderr, as follows:

JavaScript context collections

The following collections are included for JavaScript errors.

Included context collections in ASP.NET MVC.

These collections are included for all ASP.NET Core MVC exceptions.


Information about the action and why it was selected.


Information supplied in the HTTP post.


Properties from the HttpRequest object in MVC.


ALL headers from the HTTP request.


Did we receive a valid model?


TempData is collected if set.


TempData["DemoKey"] = new {
		Amount = 20000,
		Expires = DateTime.UtcNow.AddMinutes(5)


ViewData / ViewBag

The ViewBag and/or ViewData is collected if specified.


ViewBag.Title = "Hello";
ViewBag.Model = new
	state = "Running",
	Collected = true



We have a guide for reporting errors manually. Read it to get the most out of Coderr.

You can also attach your own context information by building a custom context provider.

Edit page at GitHub Create a documentation ticket Ask a question This page is generated using the open source project MarkdownWeb.