The F#/C# ASP.NET MVC 4 template has been updated to support ASP.NET MVC 4 RC and Visual Studio 2012 RC. You will need to install the release candidate of ASP.NET MVC 4 to use this updated version of the template. The install can be found at http://www.asp.net/mvc/mvc4.

As with the previous release, the F#/C# ASP.NET MVC project template supports ASPX and Razor versions of an empty ASP.NET MVC 4 project template as well as a Razor version of the ASP.NET Web API project template. The templates work on both VS2010 and VS2012 RC.

Tagged with:  

F# and ASP.NET Web API

On March 5, 2012, in Uncategorized, by Dan Mohl

A few weeks ago the ASP.NET team announced the release of ASP.NET MVC 4 Beta. You can read about it here. One of the exciting features that was announced is ASP.NET Web API. ASP.NET Web API provides an excellent programming model for building HTTP services.

One of the sweet spots for F# is in the services layer and this makes ASP.NET Web API + F# great friends. To make it easy to get started with F# and ASP.NET Web API, I’ve added an ASP.NET Web API template to the already existing F#/C# ASP.NET MVC 4 Visual Studio extension. Note: The template requires that ASP.NET MVC 4 Beta is installed.

To install the template, do the following:

1. Launch the project creation wizard (Ctrl+Shift+N), select Online in the left hand nav, search for “fsharp mvc4″, and click OK. In VS11 Beta, it looks something like the following. Note: It may take a few seconds to download.

2. After clicking OK and installing the extension, you will see a dialog that allows the creation of a new ASP.NET Web API solution with an F# project that contains the server-side code.

3. Once the project has been created, you can run it however you desire and hit the service via http://localhost:###/api/values.

Tagged with: