Chris Hammond
Friday, May 05, 2017 1:22 AM
If you’ve setup a new DNN site running on version 9.0 or 9.1, you’ll notice that you don’t have the ability to setup the Google Analytics module/code anymore. For some reason, DNN Corp in its infinite wisdom decided to remove the core, critical functionality from the Platform version of DNN and only leave it in the paid versions. Well fear not, you can easily add Google Analytics code to your pages, follow these steps.
Monday, April 03, 2017 2:51 PM

If you’re not switching all of your websites to utilize SSL encryption by default, you’re going to miss out on search results for many years to come! (see here for more info)

In the past, the notion of switching all your sites to use SSL would be daunting and a costly affair, especially if you have too many different websites to count (what, not everyone has this problem?).

I’ve been recently setting up a few websites on Azure for test purposes, and decided to look into how I could setup SSL for those sites. I came across a blog post from Rick Strahl regarding using Let’s Encrypt, for free SSL configurations. Basically with Let’s Encrypt, you can get a free SSL certificate, the main catch though is that they need to be renewed very frequently, they expire in 90 days.

From there I came across a Site Extension for Azure that can be setup to automatically configure, assign, and even renew these certificates. This takes quite a bit of work to get setup, but once setup, requesting certificates is super simple. As you add more “custom domains” to your Azure instance you can setup a new certificate for each. One problem I ran into however is that once I had setup two certificates, the extension started throwing an error when trying to add new certificates for domains. The error was:"

Cannot update IP SSL Bindings because total number of allowed IP addresses per site will be exceeded.
CloudException: Cannot update IP SSL Bindings because total number of allowed IP addresses per site will be exceeded.

This I believe is possibly due to my limitations on the Basic App Service that I have setup, where you are limited to SSL IPs, but you can have unlimited SNI SSL certs. Completing the binding process for the SSL certificate is easy, simply go to your Azure Portal, navigate to the App Service and then the SSL Certificates section. Click the Add SSL Binding button, choose your domain and select the appropriate certificate!

Boom, SSL setup and ready to go!

Update: Looks like I had a setting configured incorrectly in the Site Extension, I simply removed the web app setting letsencrypt:UseIPBasedSSL  see this thread:
Tuesday, March 07, 2017 1:20 AM

With the release of Visual Studio 2017 coming in a few short hours, I am proud to release the latest update for the Christoc’s DotNetNuke Extension Development Templates!

With this release I’ve updated my suite of DNN extension templates (modules and themes) to support Visual Studio 2017.

You can download these templates from Visual Studio 2017, by going to the Tools/Extensions menu. From there you can search the Online option for “DotNetNuke” choose the “DotNetNuke (DNN) Development Project Templates” option.


Other Download Options:

If you have any feedback, please visit the Project’s Github Repo

Here’s a quick video of how to install the templates in Visual Studio 2017

Here’s a quick video on how to make create your first DNN module. After creation the video walks you through the compilation and installation of that module into your DNN site.
Sunday, March 05, 2017 9:32 PM

In an earlier blog post I talked about the EventLog table and the Exceptions table, specifically in terms of how to “clear” the tables out. This post will talk specifically about how to keep the EventLog table cleaned up to begin with.

In DNN you have the ability to configure if you would like specific EventLogTypes to be tracked or not. By default in DNN there are over 100 different events that can be tracked in the EventLog table. Many of these are turned off by default, you can configure them to be “on” by going to the Admin Logs page in the Persona Bar, and choose the Log Settings tab


In doing so you will be presented with a page that looks similar to


From here you can click on the Edit pencil on each row and enable or disable the Logging setting


You can also turn options on such as email notifications and the Keep Most Recent entries option


Some of the default options in DNN will have the Keep Most Recent option configured to a low number, like “10 Entries” but some will have them set to All. This can cause the EventLog table to fill up with many many many events, depending on how much traffic your website gets. You can go through and set these all manually through the ADMIN UI, or you can do it in bulk in the database with this simple SQL statement:

update Eventlogconfig
set keepmostrecent = 10

If you’re using the SQL Console page you can use this statement

update {databaseOwner}{objectQualifier}Eventlogconfig
set keepmostrecent = 10

Warning: You might actually want to keep ALL logs for your site, depends on your industry and needs, but I prefer to keep mine pruned to try to keep the database smaller, more manageable and better performing.
Sunday, March 05, 2017 9:16 PM


At some point, if you manage a DNN based website long enough, you are going to run into a problem where your database seems to have grown WAY bigger than it should be. I’m not talking a couple hundred megs, I’m talking gigabytes, lots of gigabytes. This post will hopefully help you get that under control.

Tonight, I had a DNN instance that I was looking to migrate to Azure, in preparation for this I remoted into the web and database servers to see what the files and database looked like. The database MDF file was almost 1.5gb in size, for a DNN instance that has 5 portals, and very very little activity, this was concerning. I knew where to start looking though, there are two tables to start with, Exceptions and EventLog. The EventLog is tied to the “Admin Logs” in DNN 9, in earlier versions of DNN the menu item was Event Logs or even Event Viewer.

Running the following simple SQL query will get you an idea of how many rows are in those tables.

select count(1) from Exceptions with (nolock)

select count(1) from EventLog with (nolock)

If you’re running this in the SQL Console on your DNN site you might run it with

select count(1) from {databaseOwner}{objectQualifier}Exceptions with (nolock)

select count(1) from {databaseOwner}{objectQualifier}EventLog with (nolock)

This will give you a “count” of the number of rows in each of those tables. In my case, the EventLog table only had 394 records, but the Exceptions table had 300k+. That’s a pretty common cause of database size creep in DNN. Ultimately what my issue was, I had one site that still used “SolPartMenu” in the Containers for the skin, and with DNN9, those no longer work, and every request that tried to load that site (mostly search engines hitting it) caused multiple records to be thrown into the EventLog and Exceptions table.

Message:Object reference not set to an instance of an object.
at DotNetNuke.UI.Skins.Pane.LoadModuleContainer(ModuleInfo module) at DotNetNuke.UI.Skins.Pane.InjectModule(ModuleInfo module)

Now, the question is how did I know what the cause of that cryptic error message was? Well, I had just spent some time with a customer of mine this weekend upgrading their website, and they ran into the same problem, so it was fresh in my head, and I was easily able to correct this.

But let’s get back to the topic of the post, the Exceptions and EventLog tables. DNN has a way to “purge” the eventlog built into the system, and most “types” of events only get stored 10 times, so when the 11th event comes in, the first one gets cleared from the system. But, the exception Events also get logged to the Exceptions table, and there doesn’t appear to be anything in DNN that cleans that table up automatically. Because I upgraded the site to DNN 9 well over a month ago, I had hundreds of thousands of exceptions in the table. So I needed to get this cleaned up, that’s easy with the following SQL statement.

truncate table Exceptions

or the DNN SQL Console version

truncate table {databaseOwner}{objectQualifier}Exceptions

That forces the table to be purged, and then using SQL Server Management Studio I was able to run a SHRINK command on the database, bringing the files back down to an expected 30 mb.

Now you might think, well can’t I do the same on the EventLog table? Unfortunately the simple answer to that is no. The longer answer is YES, but you’ll want to look at Sebastian’s SQL script for doing so:


Chris Hammond is

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at

Latest Photos

Follow Me Facebook Me Plus Me


Any blog posts here are solely the opinion and views of Chris Hammond only. Comments on blog posts are the opinion of the commenter, and not Chris Hammond.

DotNetNuke Hosting

Hosting for this website is provided by AppliedI.Net. Be sure to visit them for all your DotNetNuke Hosting needs. 

Powered By

This website is managed by Software Solutions

Find Me