Work@Microsoft    Live@Seattle

How to customize and deploy an MVCForum website to Azure

Rate this post

I decided to create a personal technical forum in Microsoft Azure, using MVCForum, an open-source forum platform.

The Microsoft Azure web app gallery does support MVCForum.  By following the wizard you can deploy the forum with just a few clicks.  But I am going to download the MVCForum source code, customize it and manually deploy the site to Azure.   In this way, I have the flexibility and total control of the site behavior and appearance.


Here is how I did it for

1. Download the MVCForum source code from GitHub

You can either use git-clone to clone the MVCForum source code to your local repository, or directly download the source code release from


2. Create a new empty SQL Server database in Azure

After the SQL Server database is created, let’s view its SQL Database connection strings.

Next, copy the ADO.NET connection string to a notepad.  You need to replace {your_password_here} with the password you give during the DB creation.


3. Configure the MVCForum Database Connection

Now let’s open the MVCForum source code that we downloaded in the first step.   You need to find the web.config file and paste the connection string from the 2nd step as follows.  This tells MVCForum the location of the backend database.


4. Modify the MVCForum Source Code to customize its Appearance and Logic (Optional)

This is an optional step.  In my case, I want to customize the forum site header of its n3o theme, so that the forum site and my main site ( have a consistent look & feel.

More specifically, I modified the ‘MVCForum.WebsiteThemesn3oViewsShared_Layout.cshtml’ file to customize the site overall layout.


5. Deploy the website to Azure

It’s time to publish the forum to Azure!  First, right click the MVCForum.Website project and choose ‘Publish’.  It launches the website publishing wizard.

Choose ‘Microsoft Azure Web Apps’ as the publish target and sign in with your Azure account.

Click ‘New…’ to create a new web app.

In my case, I name my new web app as ‘ask-scott’.

Last, let’s click the ‘Publish’ button and hopefully, it will succeed!


6. Initialize MVCForum

After the site is successfully deploy from Visual Studio to Azure, I am redirected to the page to initialize the forum database.

The wizard is very straightforward.  After the initialization is completed, the site is live!


7. Map the Custom Subdomain ( to the Forum Website

Last but not least, I followed the article ‘How to map a sub-domain to an Azure website’ to set up the subdomain ‘’.

Comments to How to customize and deploy an MVCForum website to Azure

Leave a Comment

Your email address will not be published. Required fields are marked *