The number of avenues and options available for building and scaling web applications is surprising, especially when I reflect on the same task that years ago would require you to build a server, find a host, and basically manage all aspects of the application.

These days you can focus on building the application while leveraging services for everything from web hosting to data analytics. A good example is, which handles tracking application errors and notifies you when errors occur. Let’s take a closer look at what offers by integrating it with an existing ASP.NET application.

Error tracking in the cloud

The site promises a setup time of five minutes; it took approximately 20 minutes for an ASP.NET application, but that included the time needed to set up a trial account with the site. The service is not free; they have a rate structure depending on number of applications, errors, and so forth. However, you can take it for a spin with a 30-day free trial (no credit card needed), which is what I use in this article.

Once an account is set up, you are ready to integrate the service into your application. It supports the following platforms: .NET (including ASP.NET), Android, iOS, Java, JavaScript, Node.js, PHP, Python, and Ruby on Rails. The online documentation provides details on the service as well as integrating with your code.

Before diving into the code, let’s discuss setup on the side. The service organizes your logging into applications. You define an application by name and the technology being used. Figure A shows the initial screen presented when adding a new application to your account. You assign a name along with notification (via email) options. Figure B is presented once the Create Application button is selected. Figure C loads when the technology is selected (ASP.NET in this case).

Every application you create has a unique Application API Key that is used in your code for identification. The api key will appear on the screen shown in Figure C (at the top and in the step #3 area). Note, they have been removed in the examples to avoid reuse. Once you have the key value, it is time to configure the actual code to use the server. My first interaction with the service was in ASP.NET, so I’ll show this approach.

Figure A

Creating a new application.

Figure B

Specifying the platform for your application.

Figure C

The final setup screen provides information on using the service.

Using the service in ASP.NET

The setup steps for the client or the code side are straightforward. These steps are spelled out each time a new application is created, as shown in Figure C. While my numbers do not directly correspond to their list, the following items provide the basics of using the service.

1. Install the package via NuGet in your application.

2. Add ConfigSections to your App.config (or Web.config for ASP.NET) for settings. In addition, the RaygunSettings element with the apikey attribute is added.

3. Choose whether you will use the service via code the global Application_Error event or add the HttpModule (called RaygunErrorModule) to the application via the system.web or system.webServer elements in the configuration file.

I used the service in the previously built NancyFX example that is hosted on Microsoft Azure. Figure D shows the NuGet Package Manager with package located (search for raygun4net) and installed. Once installed, you will see a reference to Mindscape.Raygun4Net package in the solution. The next step is configuring the application to use

Figure D

Locating and installing the NuGet package in Visual Studio.

The following listing has the complete web.config for the ASP.NET application using The three areas added to incorporate are in bold; this includes the addition of the RaygunSettings section, the RaygunErrorModule element within the system.webServer element, and the apikey identified in the RaygunSettings element. With the web.config changes saved, the application is now configured to use This sample application is hosted on Microsoft Azure, so I publish it once packages are installed and configuration changes saved.

Processing errors

Once the application is configured, you will be notified of application errors via email (if configured), or you can visit the site to view application activity.

Figure E shows errors generated for this application. Notice that applications are categorized as Active, Resolved, Ignored, or Permanently Ignored. They are categorized when you drill into the individual errors as shown in Figure F; the dropdown list at the top right of the exception detail page allows you to appropriately mark it. In addition, the tabs shown at the bottom of Figure F allow you to drill into further error details, including the summary page displayed by default and Error Details, Request (details on HTTP request), and Raw Data (JSON view of the error data).

Figure E

Error activity recorded for the ASP.NET application.

Figure F

Individual error details along with dropdown to categorize.

Another piece of the puzzle

With all of the cloud services available today, you have everything necessary to piece together an application once you have an idea. For example, you can choose to host on AWS ( uses it) or Heroku with MongoLab for the backend database and process/analyze errors with a service like is not the only option with this type of service — other options include Airbrake and Crashlytics — but it is one that allows you to focus on building and maintaining code without the hassle of dealing with infrastructure (beyond managing cloud services).