I am new to Azure Deployment. I have an ASP.NET MVC app running fine locally working fine. Trying to deploy it on Azure. Using a BitBucket repository to create the app. But accessing it gives
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/User/Index.aspx
~/Views/User/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/User/Index.cshtml
~/Views/User/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
I have used Kudu Console to check that the D:\home\site\repository has every bit of the project. But D:\home\site\wwwroot misses controllers etc.
I think that it access wwwroot directory as the project directory. But I am not sure about that.
Any pointers to actual issue and solution are highly appreciated.
As I known, for classical (regardless of .NET Core applications) ASP.NET MVC Website, the
Controllerswould compiled into the .DLL file with the name of your web application. You could find it underD:\home\site\wwwroot\binvia KUDU.Since your website could work locally, I assumed that there be something wrong with the web content you deployed to Azure. You could try to check the *.cshtml files have been deployed to Azure (under
D:\home\site\wwwroot\Views) successfully via KUDU.Also, please make sure the
Build Actionof your views has been configured as "Content" as follows:Also, for deploying apps to Azure Web App, you could follow this official document.