Wednesday, September 21, 2016

Solving Error 403 forbidden after deploying MVC web applications in Azure VM

As you have reached here and reading through this post, it makes me assume that you are facing the same issue which I did and are looking for solution after trying multiple workarounds for the error i.e. Error 403: Forbidden whenever any MVC application is deployed on Azure Virtual Machine.

Based on the error title, it appears that this must have to do something with permissions to some resource in IIS but that is not the thing here and I came to know this only after spending significant amount of efforts behind this. Lesson learnt– Error message could be misleading.

Initial investigation lead me to multiple solutions and looking at the answer’s help count on different sites it appeared that mentioned solutions were working for other people, but why not for me?

As mentioned, there are multiple links you will get describing resolutions which worked for number of people below are few such links

What worked for me?

After trying all the possible solutions mentioned in the links I was still getting same error. Here is the thing which worked for me

I was simply missing few IIS settings which I did not do while enabling IIS role on my Azure VM (Note that I am using Windows Server 2012 R2)

All I needed to do is,

Open Server Manager on VM hosting my MVC web application

Click on Add roles and feature

Reach to the screen for selecting the role on this server and make sure you have enabled below two features along with other required features to enable IIS role.

Note that, I managed to solve this by enabling below checkboxes (as shown above)
  • ASP.NET 4.5
  • .NET Extensibility 4.5
And after completing the installation, the 403 Forbidden error was gone.

Thursday, September 1, 2016

Technet Azure Technical Guru Award - July 2016

Glad to share that I am awarded as Technet Azure Technical Guru for month of July 2016 for one of my Technet Wiki Article. You can take a look at it here - Azure Key Vault essentials for Beginners

You can take a look at detailed announcement here on Technet Wiki - TechNet Guru Competition July 2016 Results 
Technet Guru Competition : This is an official Microsoft TechNet recognition program, where people such as yourself can get the recognition they deserve for the time given to the community.
Each month, the contributions are scored by a panel of judges (5 per category, 2-3 in each are MS experts), and the winners of each category are showered with love and attention from all corners of TechNet. 

If you spend any amount of time crafting an awesome answer to a forum question, then why not get the most back for your efforts by posting it to TechNet Wiki?