How to make visual studio open the Im controller at the moment by default when debugging?

Now it always goes to default.aspx, which subsequently opens the default controller, but I would like to go directly to the controller, which I edit when I press the debug button.

+3
source share
1 answer

Right-click on a website in Visual Studio and select Property Pages . The Launch Options section gives you flexibility regarding which page loads first. You can select and set the Start URL parameter for something like http://localhost:1324/Home/Index, to force debugging sessions to use the HomeController index action by default.

Two things are required for this:

  • 1234 is the static port used by the Cassini web server when debugging your pages (you can change this behavior by pressing F4 in the website project and setting the Use dynamic ports parameter to false and the Port number to port of your choice.
  • - Visual Studio. , , "" .

. , , , MVC- .

0

Source: https://habr.com/ru/post/1717671/


All Articles