Scott Hanselman

Microsoft Web Platform, Web Application Gallery, Web Platform Installer (and DasBlog)

March 18, '09 Comments [18] Posted in ASP.NET | DasBlog | IIS | Mix | Open Source | Tools
Sponsored By

Slash WebIt's so fun to help "announce" things, especially things that are a long time coming and that a lot of people worked on to make things "just work." (You can follow them on Twitter @mswebplatform.)

This is one of those fantastic things. Today, you can install free applications direct to IIS using the Web Platform Installer 2.0 and the Web Application Gallery. The WebPI will also check for application dependencies, and if you like, automatically download and install them. It'll install SQL Express, PHP, whatever you need to get your apps running.

For example, you can now install DasBlog just by clicking this button:

Install DasBlog now with the Web Platform Installer

There's a bunch of cool apps available in the gallery immediately, both ASP.NET and PHP (remember that IIS kicks ass at hosting PHP):

This gallery sits on top of some technologies that have been slowly but surely sneaking out of the most-awesome IIS team lately.

How's it work?

Here's some technical details. You can install free apps a few ways, and they are all easy.

  • You can visit the Web App Gallery, find an app and click install. If you've got the Web Platform Installer it'll launch out of the browser. (Don't worry, it's not a browser plugin, it's more like iTunes. It'll "leap out of the browser" from a link.)
  • You can open IIS manager on your machine after installing WebPI, and click "Install Application from Gallery." This feature is awesome enough to require a screenshot to drink in:image
  • Or, just run the Web Platform Installer and browse around the catalog. The list of apps comes down as an Atom Feed.

Hey, isn't that dasBlog in the list there? Why, yes! ;)

Packaging Your App - Technical Details - DasBlog

You can upload YOUR free app to the gallery. Start by downloading the Application Developer's Kit. We packaged up DasBlog 2.3 like this. You install DasBlog

The package is a zip file. Inside at the root are two files, manifest.xml and parameters.xml. You start by "exporting" your app already working in IIS. Then, if your app has specific needs you can edit the files manually.

For example, here's our manifest.xml, which is an MSDeploy file:


<!-- Copies content from path into the destination specified in parameters.xml and marks as an app in IIS 5.1, 6.0 and 7.x -->
<iisapp path="dasblogce" />

<!-- Set NTFS ACLs on the destination specified in parameters.xml -->
<setAcl path="dasblogce/content" setAclAccess="Read,Write,Delete" />
<setAcl path="dasblogce/logs" setAclAccess="Read,Write,Delete" />
<setAcl path="dasblogce/siteconfig" setAclAccess="Read,Write,Delete" />


Remember that DasBlog doesn't use a database, but rather stores all data in XML files in the content folder. Our MSDeploy file sets ACLs on a few directories to allow "Read,Write,Delete." This file encapsulates a potentially tricky setup step for DasBlog.

The parameters.xml is a little more sophisticated and drives a dynamic UI form inside of the Web Platform Installer 2.0.

For example, the blog owner's email is a parameter, and it's entered in two files. Since DasBlog uses XML files, we can use XPath to describe where to poke the values in.

<!-- Prompts for admin email -->
<parameter name="Email Address" description="Enter the blog owner's email address." defaultValue="">
<parameterEntry type="XmlFile" scope="dasblogce\\siteconfig\\site.config" match="//MSDeploy:Contact/text()" />
<parameterEntry type="XmlFile" scope="dasblogce\\siteconfig\\siteSecurity.config" match="//EmailAddress/text()" />

Here's what the generated UI looks like:


You can read about this format in the Application Developer's Kit. You can parameterize your SQL files as well, it's a very flexible format.

Then we zipped up the deployment and uploaded it to CodePlex. The CodePlex site is smart enough to notice when the Platform Installer is requesting a release (it sniffs the User-Agent) and serves up the file rather than the web site, so I can use CodePlex to host the zip. (It would have sucked to have to host somewhere else.)

MSDeploy -> WebDeploy -> Web Platform Installer 2.0 -> Web App Gallery

Just to take a second, and make sure this is clear.

There's the command-line MSDeploy engine, there's WebDeploy that integrates with IIS and has a nice UI, and there's the Web Application Gallery where you can get a bunch of free applications. When you're in the App Gallery, the Web Platform Installer will do the installation.

Here's how I see it. Of course, you just have to click a button, but I always like to see what's underneath.


What's cool about this is that even if you don't want to put your app up on the Web Application Gallery, you can still use MSDeploy/WebDeploy to deploy your apps. They are REALLY powerful tools that can help you deploy, migrate between IIS6 and IIS7, and synchronize content and apps between machines in a web farm. If you deal with IIS apps all day, host them, develop them, etc, take some time and spend it over at

Now, if you want to have your app included in the gallery, here's the principles your app should follow:

Web Application Gallery Development Principles

1. Be Current: The application you provide a link to must be the latest, stable final release version available, hosted on a publically available Web URL

2. Be Free of Charge: The application for which you submit a link to the Microsoft Web App Gallery must be provided free of charge and fully functional without time restrictions. You are welcome to charge for professional support or consulting services and/or provide an enhanced, enterprise version of the application for purchase on your site.  We will be happy to provide a link to your commercial products and services from your page in the Microsoft Web Application Gallery.

3. Be Compatible: The application to which you provide a link must run on Windows Server 2003, Windows Server 2008, Windows XP & Windows Vista using best practices on running ASP.NET applications and PHP applications on IIS.

4. Be Deployable: The application to which you provide a link must integrate with Microsoft Web Deploy as described in the Microsoft Web Application Packaging Guide, and run with the Microsoft Web Platform Installer v2.

5. Be Supported: You must provide a publicly available Web site where end users can download your application, find documentation and/or get free on a best effort basis support through a forum.

6. Be Hostable: The application to which you provide a link must run well in a shared hosted environment as well as when the user has administrative rights for the computer.

7. Be Inclusive: If your link is included in the Gallery, you should include a link on your application community’s Web site to your Application entry on the Microsoft Web Application Gallery.

8. Be Safe: The application to which you provide a link must not harm customers or be malicious, dishonest, destructive, invasive, or act in any manner restricted by the Web Gallery Application Submission agreement.

Get the Microsoft Web PlatformCongrats to the IIS and /Web teams for this release, and thanks for all the guys on dasBlog for helping. Big thanks to Bill Staples for letting dasBlog 2.3 in on the launch.


Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

FizzBin - The Technical Support Secret Handshake

March 16, '09 Comments [84] Posted in Musings
Sponsored By

This is a short post, but I think it's important. Let's make it a movement. Digg it, leave a comment, Reddit it. Start using it.

We need a word that says "I know tech" when you're on the phone with tech support, you'd just say "Fizzbin" and they'd know.

I hate that 5 minute to 5 hour long "ramp up" when I'm on the phone with any kind of technical support as they realize that we both know what we're doing. Or at least, one of us does.

"So, click the start menu...type C M D and press enter. Tell what you see?"

I propose that "Fizzbin" skips that first hour. I don't like feeling like it's an ego thing. I don't want to have to say, "Hey, I kind of know this stuff, can we kick it up a notch?" I don't like explaining that YES, I've checked the cable, and YES, I have tried resetting the modem.

I'd like my tech support experience to go like this:

"Hi, Internet Tech Support...what's your issue?"


"You have an IP?"

"No. Your DHCP isn't passing out IPs. Am I banned?"

"Looks like your MAC is xxxx, you've been running a torrent?"

"Yes, I'll stop."

"Cool. You're un-banned. Fizzbin."

"Sweet. Catch you later."

Fizzbin. It's like pressing "0" at the automated teller prompt, but for geeks.

Technorati Tags:

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Hanselminutes Podcast 153 - Scott's Wife Mo interviews Scott Hanselman

March 16, '09 Comments [20] Posted in Learning .NET | Podcast
Sponsored By

Mo My one-hundred-and-fifty-third podcast is up. Scott's wife Mo turns the tables in this interview and talks to Web Developer...Scott Hanselman. How does he fit it all into a day? What about work life balance? Is Scott bored with technology? When will the madness stop?

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Genome is a sponsor for this show!

Welcome to powerful, mature object-relational mapping in the .NET world. Genome lets you use the full benefits of LINQ with all major database platforms (Microsoft SQL Server, Oracle and IBM DB2). Genome: supporting real-world enterprise application development since 2002.

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Mix: Getting my head around Oslo, M and MGrammar

March 12, '09 Comments [20] Posted in Mix
Sponsored By

imageI've been trying to get my head around "M" and "MGrammar" and "Oslo." I put the names in quotes as I'm not sure what's a codename and what's not. ;)

Oslo Developer Center on MSDN - The hub of all things "Oslo"

I had an opportunity yesterday to do a SharedView with Doug Purdy on his Mix talk. The talk is Developing RESTful Services and Clients with "M" and it's Friday at 9. He'll be doing it with Chris Sells as Code Monkey. Doug and Chris are an animated pair and their talks are a hoot.

When I've seen Oslo talks before, it's seemed like a lot of hand-waving and talk of things transforming into SQL and magic and elves. I told Doug it was too high level and that'd I appreciate something really concrete that I could really start to grok. So he focused on "M" - their new modeling language. I've done some simple DSL (Domain Specific Languages) so I figured this would be a good place to start.

Also, I took a bunch of screenshots (secret - don't tell!) while I was in this LiveMeeting/SharedView of Doug's demos. This part is making sense to me.

Here's a screenshot of their editor. Don't sweat the tools too much, but it's basically Emacs with a .NET heart written in WPF using IronPython for plugins. They call it Intellipad. You can do this stuff from the command-line, though. It's lightweight and quiet.

NOTE: The Intellipad editor is using the same WPF Editor in Visual Studio 2010. Nice to see folks sharing components. How is it all plugging together? MEF. Bam!

Anyway, on the left there, is a sentence "Scott is 36 years old." Actually my wife says I'm 35, so my bad there. Anyway, that sentence is a DSL - a Domain Specific Language. It's a DSL only because we decided it was. Just now.


In the middle there is the MGrammar (in a .mg file). (Good video on MGrammar here) 

This is kind of like Lex and YACC, but more general, and it quickly gets away from the dirty text parsing part of things and into the model much faster than they do.

The MGrammar in the middle describes our new DSL for expressing info about People. I can now say "Fred is 12 years old..." etc. Now I've got a simple DSL that I can consume and anyone can right. Still, a DSL isn't useful unless you can DO something with it.

On the right, in the third window pane is a tree of the output of this DSL with the MGrammar applied. Now I've got an object (or series of them) with properties that I can do something with.

Now,  we could give the system more info about these People. Like, give them an Id that's an Int32, make sure the system knows Age is an Int32 also, etc. There's all sorts of constraints like this that are much richer than a DB. This is the "modeling" part. We express what something is as simply as possible.


OK, so fast forward and switch gears to something more concrete. You're probably familiar with cURL. It's a the command-line tool for messing with URLs from the command line. You can GET, POST, etc with this nice command-line tool.

They created an example they're calling MURL to show how one could create a Domain Specific Language for talking to URL endpoints. Stated differently, MURL is a REST client built with their tools in very little code.

In this shot, he's got the MURL DSL on the left, looking like HTTP initially. Just GET url, for now. Then he adds to the language and makes it so he can do things like "secure using" with names and passwords. Then he adds POST support with payloads, etc. He can make his little language look like whatever he wants.


In this screenshot, he's made ? mean GET and ! mean POST, etc.


Some DSLs we use all the time are:

  • SQL - "select * from whatever"
  • XPath - "//something/else[@cool = 'neat']
  • RegEx - "%(&^%&^$#%#$@#$*@#((**$#$%"

And we often use these DSLs and their associated "engine" from our .NET code. That means, I could use MURL (or any other DSL and its engine I create) from my existing .NET code.

See the "runtime.Parse" statement in the screenshot below? I'd probably change the name and make it a one liner like "Murl.Do()" but you get the idea. Then the result is just XML I could go to town on.

Here he's using his MURL language from inside ASP.NET MVC to do some work. Don't get mired in the fact that he's just doing an HTTP GET to an endpoint. You might be all (and I was too) "ya, I can use Web Client for that." The idea would be you could create languages that can more easily expressed in a DSL than in C#.

When I worked in banking (not too long ago, actually), Patrick and I created a DSL for modeling domain object by extending XSD (an existing DSL). We could have created a much more terse and person-friendly DSL (as opposed to XML which is person-hostile) with tools like this. I can see this greatly facilitating Domain Driven Design.


Doug's talk is at Mix (and will be online later) on Friday and you can find it on the Mix Site. Remember it's not really about URLs, or REST, or MURL, it's about the creation of DSLs and the tools that support it.

It's early, but now I've got more context. I'm not on board yet, but it's slowing sinking in for me.

Other MGrammar Examples

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Free ASP.NET MVC eBook - Walkthrough

March 10, '09 Comments [40] Posted in ASP.NET | ASP.NET MVC | NerdDinner | Source Code
Sponsored By

imageToday is a pretty cool day. It's the culmination of a bunch of little stuff and a lot of hard work by some really nice dudes. Here's a few surprises.

Rob, Phil, and I have been working on the ASP.NET MVC book for a while. One (poorly kept) surprise is the inclusion of ScottGu as an author on the book. Between the four of us, we got enough forehead space for like six guys.

Here's where it gets cool.

Free ASP.NET MVC eBook

Today we're releasing the first 185 pages of the book as a FREE PDF download.

Not only that, it's licensed as Creative Commons Attribution No Derivatives. You can share, distribute, hand out, transmit it all you like. You can even include it in your own book if you'd like. ;)

We worked really hard on this chapter, but the real applause goes to ScottGu who closed down Starbucks a number of times, working late into the night. If you enjoy ScottGu's Epic Blog Posts, here's 185 pages of Epic. This chapter will be Chapter 1 in the book; kind of a book within a book.

The book itself is deep in production but this should hold you off for a while, I hope. ;)

Free ASP.NET MVC Sample Application - NerdDinner

Next, we're releasing the NerdDinner sample application at as MS-Pl. It's not nearly as sophisticated as the MVC Storefront, but it's pretty cool and does some nice stuff in a very clean way, in our opinion.

There's also more Full Application Samples to be had at with more to come soon!

Big thanks also to the NerdDinner style designer Michael Dorian Bach and to Dave Ward for his jQuery ninja skills. Thanks also to Steve Harman for his peer review. (I'm getting there! Soon...)

I'll be maintaining the application with all these folks, and you're welcome to join in! I'm hoping to add features like RSS, iCal, Blog Badges, jQuery UI controls, OpenID and more in the coming weeks. Wanna help?

Mix 09

I'll be presenting NerdDinner and the code at Mix 09 next week on Thursday at 2:30pm in session "T49F" called

"File|New -> Company: Creating with Microsoft ASP.NET MVC "

You can sign up for my talk by going to the Mix Session Builder, entering "T49F" and clicking on the "Green Plus Sign" next to the title.


About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.