Hosted on Azure VM by IIS but it dont read ASP.NET MVC C# file

Johnson 21 Reputation points

Hi everyone,

I'm new to Microsoft Azure VM and trying to host my website on it.

I've followed all the steps and successfully hosted it but the IIS do not understand my hosted file is ASP.NET MVC C#

In local file, when i run it looks like -> localhost/Admin/Login
In IIS, when i run -> ipaddress/Admin/Login, it shows '404 - File or directory not found.'
In IIS, when i run -> ipaddress/Views/Admin/Login, it shows '500 - Internal server error.' with the error message related to web config file.

Anyone know how to solve this issue? Appreciate your helps.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,515 questions
0 comments No comments
{count} votes

Accepted answer
  1. Claudiu Ilutiu 76 Reputation points

    It would be great if you could have the exact / detailed error by changing customErrors to Off in your web.config. Sometimes you get the errors in Event Viewer / Windows logs / Application from windows.

    You probably don't have installed / configured on the IIS. Here is a guide to install it :

0 additional answers

Sort by: Most helpful