I’ve already blogged about how awesome AppHarbor is.
So to back up my opinion I’ve decided to write a tutorial about how to deploy an ASP.NET MVC application to AppHarbor.
The application we’ll be deploying will be the ASP.NET MVC Music Store (created by James Senior, Jon Galloway and Scott Hanselman) which uses ASP.NET MVC 3 with Razor syntax and data access via Entity Framework 4.
Click here to a deployed version of the ASP.NET MVC Music Store running on AppHarbor.
To follow along with the tutorial you’ll need to have the following installed:
- Visual Web Developer 2010 Express or Visual Studio 2010
- SQL Server 2008 Express or SQL Server 2008
- ASP.NET MVC 3
- Git (use this guide to help you install)
- A downloaded an unzipped version of the ASP.NET MVC Music Store
If you’re also going to use the ASP.NET MVC Music Store please ensure you change the ..\Views\Shared\_Layout.cshtml to include HTML to indicate the site is a sample available from codeplex and a noindex robots meta tag.
Let’s get started
- How to add a ASP.NET MVC solution to a Git repository
- How to push a ASP.NET MVC Git repository to AppHarbor
- How To Create a SQL Server Database in AppHarbor
- How to configure ASP.NET MVC to use a SQL Server database in AppHarbor
I can browse around the store and add things to my cart but can’t log in as an administrator
That’s because you can only have one database per application… something I didn’t know when I started this series.
As AppHarbor doesn’t support file storage (yet) you can’t use the ASPDBNET.MDF database which the music store uses for ASP.NET Membership. See this AppHarbor support entry for more details.
You can of course workaround this by adding membership tables etc. to the existing SQL Server database by via an alternative membership provider which includes using another application hosted on AppHarbor.