Skip to content
.NET bindings for the error reporting service.
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

NOTE: No longer in active development

The Rollbar team has done an excellent job creating an official .NET client over at It's recommened to use this for new projects and to migrate existing projects to the client. This project is no longer maintained. Thanks to everyone who contributed over the life of this project.


Build status NuGet version Nuget downloads Coverage Status

.NET bindings for Rollbar.

I'm not affiliated with Rollbar, I just like their service.

Minimum version is .NET 4.5. There's also a dependency on System.Web.Routing, so you'll at least need ASP.NET MVC installed on the system.


RollbarSharp is available on Nuget and can be installed by:

PM> Install-Package RollbarSharp



The easiest way to get going is to add the Rollbar.AccessToken item to your app settings.

    <add key="Rollbar.AccessToken" value="YOUR_TOKEN_HERE"/>
    <add key="Rollbar.Environment" value="production"/>

From there, you have several options on how to integrate with your app.

As an ASP.NET Filter

public class RollbarExceptionFilter : IExceptionFilter
    public void OnException(ExceptionContext filterContext)
        if (filterContext.ExceptionHandled)

        (new RollbarClient()).SendException(filterContext.Exception);

And then in Global.asax.cs you can do

GlobalFilters.Filters.Add(new RollbarExceptionFilter());

Or if you're using an inversion of control system that supports binding filters, you could do it there. This is an example with Ninject. You could even dependency-inject the RollbarClient if you want to create it in your own factory method.

kernel.BindFilter<RollbarExceptionFilter>(FilterScope.Global, 10).InSingletonScope();

The OnException method could instead be used verbatim inside a Controller if you add the override keyword. protected override void OnException(ExceptionContext filterContext) ...

As an ASP.NET application event handler (Global.asax.cs)

protected void Application_Error(object sender, EventArgs e)
    var exception = Server.GetLastError().GetBaseException();

    (new RollbarClient()).SendException(exception);

As an HttpModule in the Web.config

IIS Integrated Pipeline

        <add name="RollbarHttpModule" type="RollbarSharp.RollbarHttpModule"/>

IIS Classic Pipeline

        <add name="RollbarHttpModule" type="RollbarSharp.RollbarHttpModule"/>

As an NLog target

You'll need to add the NLog.RollbarSharp assembly to your project for this to work but it's available on NuGet. Check out the NLog.RollbarSharp README for configuration details, but here's the skinny:

        <add assembly="NLog.RollbarSharp" />
        <target xsi:type="RollbarSharp" name="rollbar" />
        <logger name="*" minlevel="Warn" writeTo="rollbar" />
    <add key="Rollbar.AccessToken" value="6703358e9f54081e59bb0d65ee066363"/>
    <add key="Rollbar.Environment" value="development"/>


  • If you encounter a bug, performance issue, or malfunction, please add an Issue with steps on how to reproduce the problem.


I'm using ScriptCs for managing the build process.

To build go to build folder and then run this command:

scriptcs -script build.csx

After that, upload new RollbarSharp.{version}.nupkg to nuget.


  • Add more tests
You can’t perform that action at this time.