iFinity Blogs 

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

Building Friendly Urls into DotNetNuke Modules – Part 3 – Implementing new Url Schemes

by bchapman on Tuesday, November 23, 2010 6:47 PM


This is part 3 of a blog series about developing Friendly Url into DotNetNuke modules.  The prior versions are:

Part 1 : Why Friendly Urls and Understanding DotNetNuke Module Urls

Part 2 : Improving Module Urls

This third part in the series covers practical implementations of the ‘Level 1’ and ‘Level 2’ mentioned in Part 2.

Part 2 Recap

In Part 2 of the series, I introduced 3 levels of DNN improvement:

Incorporating contextual Keywords into the Url Reformatting the Url for length and increasing the keyword ratio Creating totally custom Url values with only keywords in them I’m happy to say that I’ve been contacted by several people developing new modules that have taken some of my advice on board and who are creating DNN modules right now with keyword-specific values. 

I’m going to cover how to implement the changes in levels 1 and 2, and give some important information about preserving existing links.

It’s time to delve in and look...

Building Friendly Urls into DotNetNuke Modules Part 2 – Improving Module Urls

by bchapman on Monday, November 15, 2010 2:34 PM
This is part 2 in a series covering friendly Urls in DotNetNuke modules.  It is adapted from the presentation I made at the DotNetNuke Connections Conference 2010.   Part 1 covers some background on friendly urls and how that relates to DNN modules, you may wish to read that first if you have arrived at this post from somewhere else.

In the previous post in the series, I expanded on which part of a Url is related to a DotNetNuke module.  This was the example given:

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/77/threadid/381676/scope/posts/Default.aspx

This Url gets rewritten to this one on the server:

/default.aspx?tabid=795&forumid=77&threadid=381676&scope=posts

In the rewritten Url, the ‘tabid=795’ is used by DNN to load the correct page (the one with the Forum module) and the rest of the Url (forumid=77&threadid=381676&scope=posts) is used by...

Building Friendly Urls into DotNetNuke Modules – Part 1

by bchapman on Wednesday, November 10, 2010 6:06 PM
This series of posts is a blog version of the presentation I did at the DotNetNuke Connections 2010 Conference.    It covers the background, theory and implementation of better Urls in DotNetNuke modules.

Part 1 of this series might be called the Friendly Url Manifesto.  I’m going to put forwards my case for why would even bother, and what’s wrong with many DotNetNuke module Urls.

Short History of Urls Urls have changed as the world wide web has changed.  I’ve identified 7 stages of Urls throughout the last 15 or so years of the World Wide Web*. 

In the beginning…

Everything at the dawn of the Web was a filename.  In fact, that was the driver of the invention – in order to access all the different papers, information and data available at CERN, the web made it possible to look at anything on any internet-connected server by ensuring that every piece of content had a Unique name.  That was called the URL or Uniform Resource Locator.

So all things looked like this : http://example.com/example-page.htm

...

DotNetNuke Connections Conference 2010 Roundup

by bchapman on Tuesday, November 9, 2010 1:31 PM
It’s hard to believe that just 7 days ago I was sitting in the Keynote talk delivered by Shaun Walker at the DotNetNuke Connections Conference.   I decided to dedicate a Blog post to the conference before the memories in my head are replaced by the minutiae  of day-to-day operations of this site.

DevConnections Keynote Presentation – Windows Phone 7 If you’re not aware – DotNetNuke Connections is a conference within a conference.  It’s embedded in the larger DevConnections conference that takes in many tracks, including Sharepoint, Sql Server, Exchange and many others.  Accordingly, the opening Keynote is something that all of the attendees are interested in.  This year it was the Windows Phone 7 introduction by Joe Belfiore, the Corporate Vice President for the Windows Phone Program.  The interesting thing to note here is that Joe’s career in Microsoft is definitely a track in the user experience (UX) field.  Which tells you a lot about the...

Lessons learned from a site outage

by bchapman on Monday, October 18, 2010 10:36 PM
If you’re a regular visitor to this site, or follow my twitter feed (and you should be!) you’ll have seen that there was a major outage of this site over the weekend.  While there is always some pain in airing the dirty laundry of a site outage, in this case there are valuable lessons to be learnt for anyone with an ASP.NET site, so I’m going to take some personal pain in the hope of greater community gain on this one.

The outage was related to a total server meltdown.  As in, completely dead, no boot, nothing.  Start over from scratch and put everything together from backups.  Here’s the gory details:

Timeline : Friday – just before lunch.

‘Bing’ goes the email – another reminder from dotnetnuke.com to install the patch for the Microsoft ASP.NET ‘Padding Oracle’ vulnerability.  It’s in big bold letters on my ‘to do list’ : PATCH ASP.NET SITES.  I had waited a little, figuring that if there were any issues with the patch, I’d hear about...

Friendly Urls for Multi-Language DotNetNuke Sites with only one Domain Name

by bchapman on Friday, October 1, 2010 3:05 PM
Since DotNetNuke 5.5 was released, and the Url Master module version 2.0 was released, I’ve received an increasing number of questions with regards to setting up sites to take advantage of Friendly Urls.  While DotNetNuke 5.5 allows you to create a true multi-language site, it does so at the cost of Friendly Urls, as the introduction of the /language/xx-XX path in the Url causes the core Friendly Url Provider to start putting the /tabid/yy back into the Url.

Assuming you only have one domain name registered for your site, and you want to run both Multi-Language and Human Friendly Urls, how do you do it?  That’s what this post is going to cover.

Standard DotNetNuke Multi-Language Urls If you switch on Multi-Language features for a DotNetNuke 5.5 site, you’ll get Urls that look like this (note, all Urls for the ‘Blog’ page in a site):

Url Language example.com/Blog.aspx en-US (default) example.com/Blog/tabid/61/language/en-US/Default.aspx...

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...
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

Page Tags