ASP.NET MVC Web Application as a Desktop Application
Way back in the day, when I was doing mostly PHP web development, I bought an application called Serlient. The basic idea was to combine a task-built web server and a web browser into a desktop application. I used it for quite a few utilities that were quick to write in PHP, but didn't necessarily need to run on a server or were really suited to be running on a workstation.
It also made re-using existing web apps easy and worked really well for showing prototypes and demos or anywhere I felt like whipping up a web app that wasn't multi-user and really deployed in more of a desktop context.
Eventually, I moved into more of a .NET context and just kind of forgot about it. Then, a couple of months ago, I ran across a mention by Scott Hanselman as a minor part of his post of something called the "IIS7 Hostable Core". As soon as I saw it, I wondered if it could be used in a similar way for ASP.NET web apps.
I've been grooving on the ASP.NET MVC framework projects I've been messing with. Among them are several of these types of apps that are really only for my own purposes (i.e. single user), but make total sense as web apps. For instance, my sandbox for MVC has been my invoicing app, Uome.
So, I gave the IIS7 Hostable Core bits a try in building the browser/server chimera. Unfortunately, it seemed to really orient toward .NET 2.0. After a few hours of heading down a unsuccessful paths, more pressing matters took over and I set it down.
Early Friday morning, I came back to the idea and went looking for the hostable web server again. This time, I stumbled acros aspNETserve as well as the other approach. When the aspNETserve site specifically mentioned .NET 3.x, I thought I might be able to get quicker results with it. I was right.
In fairly short order, this weekend, I was able to write a very usable prototype desktop application hosting both the behind-the-scenes web server and a WebBrowser control that browses that site directly. Even better, it worked with the default empty ASP.NET MVC project out of the gate, without any needed retooling.
I code-named the app Jackalope, mostly because a jackalope is an unnatural combination of 2 things that don't belong together: a rabbit and an antelope/deer. Since this thing combines a web server and a web browser in order to bring web applications to the desktop, I figured the name made sense. Besides, you've got to name the project something in order to start working on it.
Further, as part of my first Wildcard Monday, I looked at my list of skills I want to improve and decided to try to get up to speed with Camtasia. So, I put together an overview screencast that describes the idea and does a quick code walkthrough. I think I'm starting to get the hang of it and want to push forward in using it more.
That video is below and the code itself is up on this page: Jackalope. I'm interested in what other people end up using this for. I've got some distinct ideas for a 1st round of changes to make it more usable by non-developers.
Jackalope: ASP.NET MVC Web Applications on the Desktop from J Wynia on Vimeo.


August 16th, 2008 at 12:44 am
I am glad to hear that you found aspNETserve useful. It is always encouraging to hear of how others are using aspNETserve.
Keep up the great work on Jackalope.
September 6th, 2008 at 2:31 am
hi
thanks.it was very useful.
September 11th, 2008 at 4:26 pm
[...] Want to run an ASP.NET MVC using an embedded web server as a desktop app? No? I don't believe you. Read this. [...]