iFinity Blogs 

Bruce Chapman
The craft of writing code. The outcomes from being crafty with code. Crafty Code is tales from the coding bench.

Fixing ASP.NET Security Vulnerability in a DotNetNuke Install

by bchapman on Monday, September 20, 2010 4:19 PM
Scott Guthrie posted about an important ASP.NET security vulnerability over the weekend.  If you have a DotNetNuke website, this vulnerability affects you, so take the time to read this and check if your site might be affected.

So far there has been no patch for the operating system, but there is a workaround which is very simple.

Basically, the vulnerability is that malicious users can probe your site and, from certain error codes, can break the cryptography securing important files like your web.config file.

The fix involves updating your website to provide a generic error page for all server errors.  Many people will already have such a setup in place, although others (like me) might have left more descriptive error messages switched on for working out what has gone wrong.

Update [21st September] : DotNetNuke has an official post out on this one, so I think take...

Clean out the tables from a DotNetNuke Database

by bchapman on Wednesday, September 8, 2010 2:37 PM
Every now and again I get a failed DNN installation with a half-created database.  When that happens, the best course of action is to clean out the database and start again with the install, making sure the problem is fixed.  But how do you clean out the database?

Here’s a quick script I wrote to do this – to be run through a Sql query tool.

Note : don’t ever run this unless you want to actually destroy your DotNetNuke database.  It’s a scorched earth deletion. It’s the Sql equivalent of delete *.* in old DOS days – except Sql Server won’t give you an ‘Are you sure?’ prompt.

Here’s the script:

declare @tableName nvarchar(100), @sql nvarchar(255) declare drop_curs cursor for select Name from sysobjects where type = 'u' and (name like 'dnn_%' or name like ‘aspnet_%’) open drop_curs fetch from drop_curs into @tablename while @@fetch_status = 0 begin     select @sql = 'drop table ' + @tablename     execute (@sql)...

How to 301 Redirect .asp Urls to DotNetNuke .aspx pages

by bchapman on Tuesday, August 24, 2010 1:48 PM
One of the most visited entries on this blog is How to 301 redirect .htm or .html Urls to DotNetNuke pages.  From that post, I get a lot of enquiries how to do this with .asp Urls.  I have usually just told people to substitute the .htm in the post with .asp, but I’ve decided to dedicate another post just to the task of converting/redirecting ‘Classic’ ASP urls over to a DotNetNuke website.  It would seem a lot of people are replacing old ASP websites with a DotNetNuke based system (a good choice!) so this should be the final word in keeping them pointed in the right direction.

So without further discussion, let’s get straight into the steps.

Step 0 : Backup You’ll be (probably) be making changes to your web.config file, and it’s possible to mess up your entire site with a misplaced punctuation mark.  Take a copy of that file now and thank yourself later.  You can always delete a backup but you can’t conjure one back from the dead.

Step 1 : Install Ur l Master Module You’ll need the...

Performance Testing DotNetNuke 5.5 and Url Master

by bchapman on Friday, August 20, 2010 4:49 PM
Recently, Keivan Beigi posted an article on the DNN Blog about how DotNetNuke 5.5 was faster than DotNetNuke 4.9.5.  This post generated a flurry of emails to my inbox wondering whether the new version of Url Master compared to this.   I have already posted about the relative performance of Url Master and the standard DotNetNuke Url Rewriter which showed that the Url Master module was faster than the standard DotNetNuke Url Rewriter/Friendly Url Provider by a small margin.  In that post, my aim was to determine the difference in speed with no-extensions vs .aspx extensions (conclusion : not significant) – finding out that the standard Friendly Url Provider was slower was an unexpected result.

So with the release...

Url Master 2.0 Released – The next big step forwards for DotNetNuke Urls

by bchapman on Wednesday, July 7, 2010 8:48 PM
Today is the announcement of a release about 18 months in the making.  I started out with a quick sketch of functionality for a major upgrade of the Url Master module and added some of these points into my issues tracking system back in June 2008, only months after the first release.  A roadmap and prototyping was started in January 2009 and the Version 1.x code was branched in April 2009, the first workable Alpha version was going by January.  But as any developer knows, the 90% complete mark means that 90% of the work is yet to be done.  Finally that is the case and the module is ready for the wider DotNetNuke community, and I think it will make a big impact on what DotNetNuke site owners can expect from the platform with regards to Urls.

What’s new in Url Master 2.0 The main areas where the 1.x versions could be improved was in these key areas:

- Portal specific settings : most of the settings were specific to an entire DotNetNuke installation and all settings were applied to all portals.


Updated Google Analytics Provider for DotNetNuke

by bchapman on Tuesday, June 29, 2010 10:27 AM
My last update of the iFinity Google Analytics provider was back in December 2007 – and a lot has changed since then.  Probably the biggest change is the inclusion of a standard Analytics provider in the DotNetNuke core.  That doesn’t seem to have dented enthusiasm for the iFinity Google Analytics provider, with nearly 6,000 downloads since it’s original release and still running at a healthy rate of about 7 downloads per day.

With my work on Multi-Language Urls for DotNetNuke with the Url Master module, I have setup the Url Master demonstration site which shows how to setup language-specific sub-domains to tidy up and optimise the Urls on a DotNetNuke site.  Here’s the sub-domains created for the site:

fr.url-master.com – French language version nl.url-master.com – Dutch language version de.url-master.com – German language version ...

Multi Language Url Features of Url Master 2.0

by bchapman on Friday, June 25, 2010 9:04 PM
This is the second post in my series illustrating functionality which will be available with the release of the Url Master, version 2.0.

The previous post covered the new 404 Error Handling features, this post will discuss the new Multi-Language (ML) features that the module incorporates.

Like better 404 error handling, people using the Url Master module soon started to request support of multi-language Urls.  While Url Master 1.x versions did work perfectly well with ML sites, and shuffled the /language/xx-YY Url forwards in the path, so that it at least appeared to have a path structure related to the language, this was about all that could be achieved.

The first thing that was needed was the ability to localize Urls for a specific language, and to get the Urls to work without the /language/xx-YY stuck in the middle of the Url.

The next thing was to work out the best SEO strategy...

Using Friendly Urls in internal site links instead of LinkClick

by bchapman on Thursday, June 24, 2010 4:56 PM
One of the features of early DotNetNuke was the ability to track clicks of particular links within the site.  You could work out how many people clicked on a link on a certain page.

This is one of those features which is actually of limited use these days – a good web analytics package will give you that detail, and a whole lot more.  There wasn’t even a link click report you could look at to see the result – though I have written one of these you can use.

However, the ‘LinkClick’ approach still litters the DotNetNuke framework and can get ordinary people into difficulty with their SEO efforts.

The problems with the LinkClick handler The LinkClick handler is a generic Url which looks like http://example.com/linkclick.aspx?tabid=234&moduleid=355.  It can be thought of as a generic redirector, like Microsoft used to use for everything...

Real 404 Error Handling in DotNetNuke

by bchapman on Friday, June 11, 2010 4:50 PM
404 Handling is the process of managing what happens when a visitor comes to your site and enters a Url/follows a link which isn't valid.  The correct handling of 404 errors can really mean the different between a professional looking site, and one that still looks like it is in development.  The name ‘404 Error’ is used because the web server returns a response code of ‘404’, meaning it couldn’t find a matching file/resource for the Url.

A well developed 404 strategy will retain users, keep search engines up to date and in general make your site look like a polished and finished effort.

This post takes a look at what happens when a 404 occurs, how DotNetNuke handles it, and how the new version of Url Master (2.0) can handle 404 errors.

Background on DotNetNuke 404 Error Handling. In order to discuss issues behind DotNetNuke 404 handling, it’s worthwhile to just take a background look at how DotNetNuke...

Top 5 DotNetNuke Manifest file Module Packaging Tips

by bchapman on Tuesday, May 25, 2010 5:00 PM
1. Use Html in the File for better layout in the install pages This one comes from the blog of Erik VB : use html in the manifest file by including A CDATA section is a way of including xml/html within an xml file.  As a manifest file is just a big xml file, you can use this to your advantage and include cdata sections for various pieces of information.  For example, instead of providing an email address, here’s what’s in my manifiest file:

Contact Page]]>

When the module installs, instead of getting a plain listing of an email address, this gives a link to the page on the iFinity website for contact.    You can also see in the below screenshot that the Url is an actual link to the site.

Bruce Chapman
Hi, I'm Bruce Chapman, and this is my blog. You'll find lots of information here - my thoughts about business and the internet, technical information, things I'm working on and the odd strange post or two.
Connect with Bruce Chapman on Google+

Share this page
Get more!
Subscribe to the Mailing List
Email Address:
First Name:
Last Name:
You will be sent a confirmation upon subscription

Follow me on Twitter
Stack Exchange
profile for Bruce Chapman at Stack Overflow, Q&A for professional and enthusiast programmers
Klout Profile