September 2011 - Posts - Jon Galloway

September 2011 - Posts

ASP.NET MVC 4 Overview - Part 1: Installing ASP.NET MVC 4 and creating a new project

I'm starting a series going through some new features in ASP.NET MVC 4. I may accidentally build a working application along the way, for some value of working. Probably not, though. The main goal is to overview what's in ASP.NET MVC 4.

If you've missed my earlier posts, the top two places to find out what's in ASP.NET MVC 4 are:

Note: I'll probably go into some obsessive detail about some minor random things in this series. For example, later in this post I dig a bit deeper into the installer than you may care about), so don't read anything into that. Installation on two machines has been really simple for me, but that didn't keep me from digging into some fine points of the installation process.


ASP.NET MVC 4 Developer Preview was released at the BUILD conference. It's a Developer Preview, meaning that it's not the official release version and it's not intended for production use. According to the release notes:

This is a preview release and is not officially supported. If you have questions about working with this release, post them to the ASP.NET MVC forum (, where members of the ASP.NET community are frequently able to provide informal support.

The end user license agreement has more information. Some excerpts from the EULA:


      • You may install and use any number of copies of the software on your premises to design, develop and test your ASP.NET programs for use with the software.
      • You may not test the software in a live operating environment unless Microsoft permits you to do so under another agreement.
    2. TERM. The term of this agreement is until 30/06/2012 (day/month/year), or next release of the software, whichever is first.
    3. PRE-RELEASE SOFTWARE. This software is a pre-release version. It may not work the way a final version of the software will. We may change it for the final, commercial version. We also may not release a commercial version.

So, kick the tires, report feedback, and get ready for the official release. There's announced release date, but the previous ASP.NET MVC releases have been pretty regular and the expiration term in the EULA seems to fit with that.

ASP.NET MVC 4 Developer Preview runs side by side with previous versions of ASP.NET MVC, however there are a few known issues to be aware of. The biggest one:

Installing ASP.NET MVC 4 Developer Preview breaks ASP.NET MVC 3 RTM applications. ASP.NET MVC 3 applications that were created with the RTM release (not with the ASP.NET MVC 3 Tools Update release) require the following changes in order to work side-by-side with ASP.NET MVC 4 Developer Preview. Building the project without making these updates results in compilation errors.

That sounds more scary that it is, since it doesn't apply to the ASP.NET MVC 3 Tools Update (released after the RTM). The readme lists a pretty quick workaround for that issue if you do hit it.

Installing ASP.NET MVC 4 Developer Preview

As with previous releases, you've got two options for installing ASP.NET MVC 4 Developer Previous: Web Platform Installer or manually downloading and running the installer.

Option 1: Installing via Web Platform Installer

In general, I recommend Web Platform Installer because it checks to make sure you've got the prerequisites; if you're missing something it will figure it out and install it before installing ASP.NET MVC 4. While most developers (myself included) will think they're way too smart for that, a lot of the setup and configuration issues I see (for example, in the MVC Music Store support forum) would have been fixed by using WebPI, and it's caught issues I'd have missed when I've installed it. So my recommendation continues to be to use the Web Platform Installer:

Option 2: Installing via the installer executable

There are a few reasons why you might want to download and run the installer manually:

  • In the case of ASP.NET MVC installations, WebPI really just wraps the MVC installer executable. While you're still getting one of the main benefits of WebPI (prerequisite checking), some of the other advantages of WebPI (e.g. minimizing download and installation time by only getting what you need) don't apply.
  • Since WebPI is wrapping another installer which is updating Visual Studio, if there's an edge case issue with the installer it may not be reported correctly to WebPI. I usually tell people to start with WebPI and in the off chance that they hit a problem, run the installer manually. That way you still get the dependency checking with WebPI.

You can download the ASP.NET MVC 4 installer:

What gets installed

The ASP.NET MVC 4 installer looks a lot like the ASP.NET MVC 3 installer:

2011-09-09 08h55_07

If you want to watch what it's installing, you can watch the progress information, or you can just crack open the setup file with a compression tool like 7-Zip:

2011-09-22 16h25_42

You can see that the installer includes the following:

  • ASP.NET MVC 4 installer (which installs into \Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4)
  • ASP.NET MVC 4 tools (for Visual Studio and/or Visual Web Developer, depending on what you've got installed)
  • ASP.NET Web Pages 2 installer (which installs into \Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0)
  • ASP.NET Web Pages tools (again, for Visual Studio and/or Visual Web Developer as appropriate)
  • KB2591016 for Visual Studio 2010 SP1 (I don't know what this is, honestly)

If you're really interested, you can unzip the installer and dig around in parameterinfo.xml to see what's installed and under what conditions.

The installer takes around 15 minutes, the overwhelming majority of which is spent updating VS/VWD tooling. (more on that in a future post when we talk about recipes)

File / New Project

After installing ASP.NET MVC 4 Developer Preview, you'll see a new project type in the VB and C# / Web sections. I have decided to title my application Instant Monkeys Online as an homage to a venerable Web 1.0 service which has served me well for quite some time, but unfortunately has not been updated to take advantage of modern web technologies.

2011-09-23 14h21_49

After clicking OK (or just pressing the enter key), I get to set a few options about the project I'll be creating.

2011-09-23 14h30_49

If you've been using ASP.NET MVC for a while, you'll notice that the Project Template dialog has been steadily filling up.

  • Empty project template - this stripped down template was added with ASP.NET MVC 2, and is generally intended for developers who want to start from scratch. We actually use this template in the MVC Music Store tutorial so that new developers would start with a clean slate and see how things worked in a new project without any complications or extra "magic."
  • Internet Application - This is the default template. While it's had some major updates along the what, the Internet Application template is what shipped in ASP.NET MVC 1. It contains a basic design and a login / registration system that interfaces with the ASP.NET membership system.
  • Intranet Application - This shipped with ASP.NET MVC 3. It's very similar to the Internet Application template, but user management is handled via Windows Authentication rather than ASP.NET membership. You can read more about that in the MSDN tutorial: How to Create an Intranet Site Using ASP.NET MVC
  • Mobile Application - This is the new contestant in the project dialog for ASP.NET MVC 4. It creates an application using jQuery Mobile which is specifically intended for mobile browsers. While it will display in a desktop browser, it looks pretty goofy.

For this series, I'm going to go with the Internet Application template. We'll probably look at adding in jQuery Mobile support into this application later.

That's it for this first installment. We'll take a look at the improvements to the default templates to support adaptive rendering in the next one.

Posted by Jon Galloway | 3 comment(s)
Filed under:

Jon talks ASP.NET MVC 4, ASP.NET 4.5, ASP.NET Web Pages 2, and Visual Studio 11 on Jesse Liberty's "Yet Another Podcast"

Jesse Liberty interviewed me about all the new Developer Preview releases for web developers. He asked me a lot of great questions over the course of a 45 minute interview.

Download / Listen:

Yet Another Podcast #49–Jon Galloway: What’s New In ASP.NET

Here's a rough transcript:

  • How can I find out what's been released and get more information?
    • Jon talks about the page which has links to everything you'd want to know about the new releases
  • What is a Developer Preview?
  • What's the difference between ASP.NET, ASP.NET Web Forms, ASP.NET MVC, and ASP.NET Web Pages?
  • What's the difference between ASP.NET Web Pages and WebMatrix?
  • What are the highlights in ASP.NET core?
    • Asynchronous support
    • Advanced Validation features
    • AntiXSS support (we talk about why you'd want to use it)
    • WebSockets
    • Bundling and Minification support
  • What's new in ASP.NET Web Forms?
    • Strongly Typed Data Controls
    • Model Binding
  • How does it help to have ASP.NET Web Forms pick up some features from ASP.NET MVC?
  • What's new in ASP.NET MVC 4?
    • Default project template - new look, adaptive rendering
    • Display modes
    • Mobile template using jQuery Mobile
  • Is it possibly easier to get started with ASP.NET MVC by first learning ASP.NET Web Pages?
  • Is it time to learn ASP.NET MVC 4 if you haven't yet?
  • What's new in Visual Studio 11 for Web Developers?
  • Where does HTML5 fit into these new releases?
  • What's WCF Web API, and how does it relate to all these new releases?
    • Link: WCF Webb API Preview 5 Is Now Available
    • Jesse's just written a blog post recommending a WCF Data Data Service - is that still valid, or should he be recommending WCF Web API? How do you pick which one to use?
  • What's new in ASP.NET Web Pages 2?
  • How did this all this content get put together?
  • Jon and Jesse talk about HTML support that was just included in Blend.
  • Jon talks about NuGet updates and the ASP.NET MVC 4 Recipes feature.
  • Jon circles back to where all the information is at:
  • Jesse asks Jon about Professional ASP.NET MVC 3
Posted by Jon Galloway | with no comments
Filed under: , ,

Get the scoop on the ASP.NET 4.5, ASP.NET MVC 4, ASP.NET Web Pages 2, and Visual Studio 11 Developer Previews

We just announced a lot of great new information about ASP.NET 4.5, ASP.NET MVC 4, and Visual Web Developer 11. Here's an overview of what's available, how to get it, and some of the top features.

Note: These are all developer previews. That means they're not officially released, supported, shipping products; they're previews to let you get an early look. Read the release notes and play safe!

ASP.NET 4.5 Developer Preview

ASP.NET 4.5 is part of the newly announced .NET 4.5 Developer Preview. It's available for MSDN subscribers today (9/14) with general availability on 9/16. This release includes a lot of great core features in the ASP.NET runtime as well as ASP.NET Web Pages enhancements.

Top Links for the ASP.NET 4.5 Developer Preview:

  • is our hub for new information about what's coming in the next version ASP.NET. Watch it for regular updates... I have production access!
  • Scott Guthrie's vNext blog post series - Scott's begun a series highlighting some of the top features in ASP.NET vNext.
  • ASP.NET vNext video series - these are some great ~1 minute screencasts from the ASP.NET PM's who own the features, and Scott's been featuring them in his aforementioned blog post series. Stand by for a lot more - I've seen the list, and they're really well done.
  • What's New in ASP.NET 4.5 and Visual Web Developer 11 Developer Preview has a ton of information on what's on that way. By "ton" I mean almost 10K words, but broken up by so many beautiful screenshots that it you'll be wishing for more.

Here are some jump links to specific features in ASP.NET 4.5 and ASP.NET from the What's New page to give you an idea of the features:

ASP.NET MVC 4 Developer Preview

The ASP.NET MVC 4 Developer Preview is available now, and you can install it via the Web Platform Installer.

Top Links for the ASP.NET MVC 4 Developer Preview:

  • - This is our "official" summary page for information ASP.NET MVC 4, and we'll keep this updated with the latest information about ASP.NET MVC 4 through the release cycle.
  • Release Notes - The Release Notes are the best way to find out what's new and changed.
  • ASP.NET MVC Forum - If you run into any questions or issues, posting on the ASP.NET forums is the best way to get feedback from the product team and the broader ASP.NET MVC community.
  • ASP.NET MVC 4 Mobile Features tutorial - ASP.NET MVC 4 has a significant focus on developing for mobile platforms, and Rick Anderson's excellent tutorial is a great way to get up to speed.
  • Phil Haack's blog post (ASP.NET MVC 4 Developer Preview Released) - Phil announces the release as well as his ASP.NET MVC 4 and NuGet related talks at BUILD.
  • ASP.NET MVC 4 Roadmap - The ASP.NET team doesn't keep many secrets, and they publicly announced the complete roadmap for ASP.NET MVC 4 months ago. The Developer Preview hints at where things could go, but if you want to see the complete vision for the released product, the Roadmap is the best way to find out.

Visual Studio 11 Developer Preview

Visual Studio Developer Preview is of course a lot bigger than "just" an update for the web development features, but it's definitely got plenty of them. The new Visual Studio features are also listed in that big What's New page:

Visual Web Developer 11 Developer Preview

Visual Studio 11 is available for MSDN subscribers today (9/14) with general availability on 9/16. You can find more information about Visual Studio 11 Platform Preview on MSDN.

ASP.NET Web Pages 2 Developer Preview

ASP.NET Web Pages 2 has been announced, with more information to follow really soon. Watch the page for more information. Here's the feature summary:

ASP.NET Web Pages 2

More Posts