Click here to Skip to main content
13,900,392 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


12 bookmarked
Posted 13 Mar 2014
Licenced CPOL

Hosting Exceptionless Yourself

, 13 Mar 2014
Rate this:
Please Sign up or sign in to vote. goes opensource; so how do you host it yourself?


Around a year ago, Exceptionless launched - this is a product provided by CodeSmith which has a fairly simple goal - to capture, log and allow reporting on Exceptions that occur within your deployed applications.

Exceptionless recently published their source onto GitHub, so now in addition to their (exceptionally good value) hosting, you can now host it internally if you need to. While it might sound odd, I'm inclined to use their public hosted service for Internet connected scenarios, but I regularly come across environments and situations where it's not permissible for information such as errors (especially with stack traces) to be transmitted off site.

So that's where you have to start considering to host this sort of infrastructure yourself.

Getting the Code

Head over to the GitHub site of Exceptionless and download the code (click on download zip on the right). Decompress this onto your computer.

Now open up the Exceptionless.sln file, and we will check it compiles.

You might see a prompt for "Security Warnings" as the project has been downloaded from the internet; make sure the "Ask me for every project in this solution" is unticked and hit OK.

There are many projects in the Exceptionless solution, but the one we are most interested in is Exceptionless.App; this is the actual main website / core of Exceptionless. Right click on it and select Build. During the compilation, you might notice that some NuGet packages are downloaded - if the build fails, re-run it before trying to debug as usually these get resolved due to these packages getting installed.

Deploying the Code

The easiest way to publish the web app is to simply create a Publish Profile for the Exceptionless.App project.

To do this - right click on the Exceptionless.App project, select Publish.
Select New Profile from the drop down and enter a name.
Set the method depending on where you want the project published; personally, I prefer to publish these things locally so I can arrange moving them onto the server manually - at least, until I build a release pipeline to do all this automatically for me!

Once you have the code published, you will need to (possibly!) copy it up onto your server - ensure your IIS site is running .NET 4.5.1.

You'll also need to install the MongoDB and Redis Services. While both of these services perform better under Linux than they do Windows, I've opted to put my small installation on a Windows server (at least for now), and ended up using the Redis and MongoDB Windows Service installers that are available on the net.

* Install Redis 2.6: Redis 2.6 is not as simple as 2.4 to install on Windows, as no-one has released a service installer (yet). I'd recommend following this CodeProject article to get Redis installed and running:

Redis has no configuration changes that need to be made, however, for Mongo there are a few more steps to get it working.

* Install MongoDB Service by downloading and decompressing MongoDB from here:

Once you have MongoDB decompressed, you will want to place it somewhere on your server - such as c:\mongodb. Create a data\db and a log directory alongside the bin one that was in the zip (so you end up with c:\mongodb\bin, c:\mongodb\log and c:\mongodb\data\db).

Then you need to create the config file - create a file called mongodb.cnf in the bin folder and place the following lines in it:


Now to install the service! Make sure you have a suitable user account before you try this.

Open up a Command Prompt as an administrative user, and change into the bin folder (c:\mongodb\bin).
Enter the following command:

mongod --install --serviceName mongodb ---serviceUser <username> <br />--servicePassword <password> -f c:\mongodb\bin\mongodb.cnf 

This should complete without error, and will register the MongoDB Service with the specified user account and config file.

You will want to pop into Administrative Tools \ Services to make sure that both of the newly installed services are running - Redis and MongoDB.

Open up the web.config for your deployed Exceptionless project, and start by finding the appSettings section - there are a few elements here you will want to change:

  • Change the Base URL
  • Set whether SSL should be enforced or not (if you haven't installed a certificate on your site, don't set this)
  • Set the WebsiteMode to Production

Under, mailSettings, set an appropriate entry for your mail server.

Under system.web, machineKey, generate a new machine key and replace the value that is here.

Save the file, and you should be able to hit your new error capture website - the first account that you register will become an Admin account, so don't leave it sitting at this point. :)

Hooking Up Your Application

By this point, the web component is fully operational, but how do you get your error data into it?

Well, the absolute easiest way is to install a NuGet package into your project, but the best place to get the information on what to do is actually IN Exceptionless:

Follow the instructions there, and once you have open you applications config file - look for the exceptionless section.
As well as specifying the API key here, you need to add serverURL; so you should end up with something like:

<exceptionless apikey="blahblah" serverurl="" />

Note that if your Exceptionless installation is not running on HTTPS / SSL, you will need to specify the http:// url instead.

And that's it! Any untrapped errors in your application will now be sent to your Exceptionless installation!

If you want to know more about Exceptionless, or how to use it after you've got it installed, I'd recommend you take a look at their documentation.

This guide can be used to install Exceptionless on-premise, on a dedicated server at your web host, or even on EC2 or Azure's Virtual Machines.


  • 12 Apr 14: Updated for Redis 2.6, removed the error regarding SimpleInjector as it is no longer applicable
  • 13 Mar 14: Complete first release
  • 05 Mar 14: First draft


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Andy Neillans
Team Leader
United Kingdom United Kingdom
A long term software developer and technical architect with a strong interest in Agile, Continuous Integration, Continuous Deployment and just "getting-stuff-done" in general!

You may also be interested in...


Comments and Discussions

QuestionMy vote of 5 Pin
Bharat Mallapur23-Dec-14 22:58
memberBharat Mallapur23-Dec-14 22:58 
GeneralMy vote of 5 Pin
AJSON14-Mar-14 1:10
mvaAJSON14-Mar-14 1:10 
Questionbackground needed Pin
bryce13-Mar-14 15:46
memberbryce13-Mar-14 15:46 
AnswerRe: background needed Pin
Andy Neillans13-Mar-14 22:32
professionalAndy Neillans13-Mar-14 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web05 | 2.8.190306.1 | Last Updated 13 Mar 2014
Article Copyright 2014 by Andy Neillans
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid