Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Problem Viewing MVC Pages In Visual Studio

$
0
0

When I created a Web API project in Visual Studio 2019, I noticed that along with an MVC Home controller a Web API controller is also created automatically for me. The problem is that when I set the Home/Index page as the starting page and click the play button, it threw an error. The error I got was "The resource cannot be found." I noticed that the path in the address bar is "http://localhost:53399/Views/Home/Index.cshtml".

However, when I right click on Index.cshtml in the Home folder and select Show in Browser, the path I see in the address bar is "http://localhost:53399/Home/Index" and the page is rendered just fine. My question are is this the correct behavior and am I not suppose to click the play button to display the pages? 


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>