Posts Tagged 'DotNetNuke'

Upgrading ASP.NET Webhosting the Easy Way with the Web Platform Installer

Over the last few weeks, I’ve been busy upgrading my company webhosting offering from Windows 2003 / IIS 6 to Windows 2008 / IIS 7.5. We’ve been hosting sites and applications for our consultancy customers for a few years now – I think the first one went live in 2000 – so this is probably the fifth time we’ve transferred sites from one server to another. But, familiar as it is, the process is always a daunting one. I was especially nervous this time because I’m not yet as comfortable with IIS7 as I was with IIS6. There are so many details you have to get right when you’re setting up a Web site. So I was hugely relieved to come across the Web Platform Installer.

Put simply, the Web Platform Installer does all the hard work for you.

One of my big concerns was DotNetNuke. I have a number of live DotNetNuke sites, and was nervous about transferring them. It’s one thing to create a DotNetNuke installation on IIS – quite another to copy it over to another, different server and have it work and be secure.

Actually, if I were transferring from IIS 7, it wouldn’t be so difficult. I could use the (free) Web Deploy add in and export/import packages. From the documentation, I probably could have used Web Deploy to help with the transfer, even when going from IIS 6 to IIS 7… but there seems to be a lot of command line involved, and I felt there just had to be an easier way. Fortunately, there is – by combining the Web Platform Installer with that key programmer skill, copy and paste.

What is the Web Platform Installer?

Put simply, the Web Platform Installer creates Web applications inside IIS 7. You can use it to create stand-alone Web sites or virtual directories for a range of standard Web applications. Once you install it, it appears as one of the options inside IIS, thus:

screenshot of IIS7 with platform installer

Here’s a close up:

close up of platform installer in IIS

If you double-click on the Web Platform Installer, it loads the latest Web Platform products:

Screenshot of platform installer

That list might not include what you’re looking for – DotNetNuke isn’t there, for example – but you can use the search box at the top to look for other applications.

searching in platform installer

Just hit enter, and it will come back with any matches:

results of search

Now all you have to do is click Add and then Install and accept the terms and conditions. It will then download the selected application.

wizard step one

wizared step 2 - installation

Once the application has downloaded, you get a 2 page wizard that allows you to create either an application under an existing Web site, or a new independent site. The first page sets up the app – the second shows the installation progress.

installing downloaded package

finalizing installation

The end result is a fully functional Web site, set up with all the correct permissions etc.

installed web site in IIS

Now the sneaky bit – replacing the new installation with your existing DotNetNuke site.

If you surf to the new site, DotNetNuke will go through its usual installation process. But that’s not what we want. We’re not looking to create a new site, but to transfer an existing site. We want to take our custom Skins and Modules, and most importantly the current database, and move them to the new server.

The first thing I did was copy over the database to the new server and make sure it was set to the correct permissions. Then I checked that the new site was assigned to the right application pool identity – in this case, Network Service as that’s what the database connection string uses.

IIS Application pools

I clicked on Set Application Pool defaults, and then changed the Identity to Network Service:

changing pool identity

Now all I had to do was copy the files from the current site over the newly installed site, change the server name inside the Web config – and that was it: I had successfully transferred my sites. It was quick, easy and a lot less stressful than I was expecting. (It is very important to copy and paste over rather than moving the files, by the way – copying picks up the permission settings from the destination, and that’s what you want).

If you’re interested in packaging ASP.NET applications for deployment to IIS 7 using the Web Deploy add in, then we cover that in Learning Tree course Building Web Applications with ASP.NET and Ajax. If you want to know more about administering IIS 7 – then you should probably go on Internet Information Services 7.5 for Windows Server® 2008 – a course I should really get around to attending myself!

Kevin Rattan

Which .NET CMS to Use?

The question for today is – if I’m planning on implementing an ASP.NET Web CMS, which one should I choose?

My company used to have its own custom .NET Web CMS, Mantranet. Mantranet was a good solution in its day – it was end-to-end AAA accessible, for one thing – but eventually it became a little long in the tooth and we felt it was no longer worth the effort to modernize the product. The CMS market is now so crowded, and has major players like SharePoint in the field. We decided it was time to move on.

So the question became – which .NET CMS was the right one for us?

We could have gone with SharePoint, of course, but having looked at it, we didn’t feel it was really appropriate for us. SharePoint is very popular, and it’s great for managing information within a large company, but not so much for creating self-standing Web sites (at least, not if you are working with the free version).

So, if not SharePoint, who? The two obvious choices are DotNetNuke and Orchard. With Microsoft putting such a big push behind ASP.NET MVC, and with some Microsoft developers working on the open source Orchard ASP.NET MVC CMS, it seemed like a good idea to give it a try.

orchard home page

Orchard is a thing of beauty. It uses all the right architectures, from Inversion of Control to Test Driven Development. It has extensibility built into it at every point. It uses the Razor view engine (with HTML5) and has clearly been designed by some top flight programmers. We played around with it, set up a test site and created our own theme.

screen shot of custom theme

Then we decided not to use it.

There are various problems. Firstly, Orchard is at such an early stage of development that it’s still buggy. I found that it would not successfully create a package for deployment, but gave no useful error message to show what the problem was. Any changes to the code, even trivial ones such as applying an attribute to require HTTPS for logging in, broke the application in unexpected ways. Themes provided on the Website had errors and broke when run in debug mode.

But much more important than any of these teething troubles is a fundamental design flaw: each page is conceived as a single, monolithic content element. Any additional content you want to add is going to appear on multiple pages.

I’ve also been developing DotNetNuke sites for a few years now. It isn’t perfect and it doesn’t have such a fancy architecture – but it works, and my customers can have as many content elements on a page as they like. (Just as they used to be able to do with Mantranet).

the huey091foundation website front page

So it’s a slam dunk – Orchard may be modern and pretty, but in terms of usability, DotNetNuke has it beat hands down. It’s easy to create your own modules (provided you know Visual Basic and ASP.NET), there’s a vibrant market in third party Modules and Skins and I’ve never had any problems with deployment. So my new site is a DNN site… We liked the look and feel of the Orchard version, though, so recreated the theme as a DotNetNuke skin.

Having said that, if you are interested in ASP.NET MVC, then I would strongly recommend downloading Orchard and taking a look at the code. It is seriously well done, and I learned a lot from it. I might well take another look the next time my company site needs renewing, and see if it hasn’t matured enough to be a real contender. Of course, it is very complex, and you might want (or even need!) to go on Building Web Applications with ASP.NET MVC first…

For related information, check out these courses from Learning Tree:
Programming SharePoint® 2010 Applications with .NET
Visual Basic® Programming for .NET
Building Web Applications with ASP.NET and Ajax

Kevin Rattan

Learning Tree International

.NET & Visual Studio Courses

Learning Tree offers over 210 IT training and Management courses, including a full curriculum of .NET training courses.

Free White Papers

Questions on current IT or Management topics? Access our Complete Online Resource Library of over 65 White Papers, Articles and Podcasts

Enter your email address to subscribe to this blog and receive notifications of new posts by e-mail.

Join 29 other followers

Follow Learning Tree on Twitter


Do you need a customized .NET training solution delivered at your facility?

Last year Learning Tree held nearly 2,500 on-site training events worldwide. To find out more about hosting one at your location, click here for a free consultation.
Live, online training

%d bloggers like this: