Blue Chip Consulting

WebMatrix for mojoPortal 

Posted by Ertan Sertcan May 01, 2011

I outlined in a previous post, WebMatrix for Drupal, how easy it is to use the Microsoft Web Platform Installer to setup web sites such as Drupal, using WebMatrix to edit and run sites using the IIS Express web server. The same can be said for mojoPortal. In fact once you have WebMatrix setup, you don’t even need to use the Web Platform Installer if you know you have the required prerequisites, you just download a copy of mojoPortal, open it in WebMatrix and you’ll have a new site up in minutes. I recently use this approach to do some volunteer work for a junior Australian Rules Football club web site.

Just download the latest deployment zip file for your required database and .Net Framework version from the mojoPortal web site. The deployment zip files contain no C# code and are all you need to create web sites using the CMS in the majority of cases.

 Download the latest mojoPortal zip

Unzip the file to a directory on your hard drive. I tend to name the folders with the mojoPortal version number, eg C:\MojoPortal2362 or C:\MojoPortal2365. The file contains a wwwroot folder with all the required ASPX, JS, CSS and so on as well as some files in the root folder. Open the ReadMe.txt file.

mojoPortal Zip file contents

By reading the instructions, you just need to create an empty database (MS SQL Server 2008 in my case) and update the connection string in the user.config.sample file found in wwwroot, saving it as user.config. For example

<add key="MSSQLConnectionString" value="server=(local);UID=fred;PWD=secret; database=mojoPortalTest" />

Then open the existing site (Site From Folder) using Microsoft WebMatrix.

WebMatrix open site from Existing Folder

Open at the wwwroot level folder, eg in this example C:\MojoPortal2365\wwwroot. If you open at the parent level C:\MojoPortal2365 you will get a strange Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. 

Rename the site if you like, by right clicking the default wwwroot1.

Rename the site

Here I named the site to Demo although the title bar still shows wwwroot1 until you reopen the site. Hit the Run button on the ribbon.

image

And a new mojoPortal site is up and running, it will have a local port number assigned by IIS Express. There are no permissions to set on specific folders, no playing around with IIS settings to get it running.

New mojoPortal site via WebMatrix Run button

You can see that it’s created all the database tables by looking at SQL Server Management Studio (in my case having selected this as my database platform) or WebMatrix. To see the tables in WebMatrix you first click on New Connection to setup the initial connection information.

View tables in SSMS View tables in WebMatrix

Of course you can use the Web Platform Installer to perform the complete installation of mojoPortal. But once you have WebMatrix, its simple to download and unzip the deployment files, open them in WebMatrix, create an empty database and click run. Just like 2 minute noodles, this is 2 minute mojoPortal.

Comments are closed on this post.

Site Map | Printable View | © 2010 Blue Chip Consulting | mojoPortal | Styleshout