Step by Step: Upgrade KiGG 1.1 for use with MVC 1.0

Mar 24, 2009 at 10:51 PM

For 2 reasons: 1)My requirements for using KiGG are simple and version 2.0 seems overkill and 2) I'm runing XP with IIS 5 for development and although I can mostly get KiGG 2.0 running, there are still issues, so decided to stick with 1.1.

Here are the steps to get KiGG running on the MVC 1.0 release.  Disclaimer:  I just worked through googling as I went to "get it to work".  How I ended up patching the application may not be 'best' solution, but works. And most of the changes are minor anyways.

- Qualify full path 2 lines in UserController.cs"body = File.ReadAllText(file);" with "System.IO.File."

- Update all RenderView methods. Explained here:

- After updating ReviewView to View(), you'll need to update three blank returns with "return View();" - It doesnt look like it ever reaches it any way, with a redirect happening right before.

Also, if you get a blank page after upgrading to latest MVC 1.0
 - check out:
- Update code that references ViewData to ViewData.Model

- Add this to web.config.
        <add namespace="System.Web.Mvc.Ajax"/>
        <add namespace="System.Web.Mvc.Html"/>

- The ActionLink Generic method was taken out an put in the futures assembly. Download the dll and include in the project.
 Include this namespace in web.config: <add namespace="Microsoft.Web.Mvc"/>
 - More about ActionLink issue here:

- Update line 5 in StoryListView.ascx to <% BaseStoryListData viewData = ViewData.Model; %>
 - Keep going thru and you'll find similar errors where you need to update ViewData to ViewData.Model

- Update line 41 or UserController.cs to make the 'bool rememberMe' nullable by adding a "?"
 - public ActionResult Login(string userName, string password, bool? rememberMe)
 - Not sure this is ideal solution, but then on line 66, you need to cast the bool? back to a regular bool.
  FormsAuthentication.SetAuthCookie(userName, (bool)rememberMe);
 - Dont forget to update line 6 of Json.aspx for ViewData.Model to get logins working smoothly
 - reference: