How can I "View in a browser" mvc 2 application?

This is probably a pretty simple question, but I don’t see how to view it in the browser, as I would like for a traditional asp.net application.

+4
source share
3 answers

If you use Visual Studio, Ctrl + F5 to run without debugging, and Cassini will take care of the rest (or do you mean from within the visual studio, how can you use web forms)?

0
source

Unfortunately, it seems that Microsoft has confirmed this as an error .

There are several workarounds you can try - although none of them are exactly what you are looking for. None of them allow you to start your web page from any arbitrary page, just by right-clicking.

One inaccurate workaround that is enough for me: If you open your project properties and go to the "Web" tab, you will see the "Start action" setting. Change this to "Do not open the page. Wait for the request ..."

Now when you start debugging, nothing will happen! (oh no it's worse!)

Now you can right-click on the icon in the Cassini system tray and select to open the browser from there. You need to do this only in the first session of the day. After that, you can go where you want on your site and leave this browser window open all day. Allowing you to start and stop debugging from this point whenever you want.

Again, this is not exactly the same, but it is also not scary.

0
source

Just run the Visual Studio project and it should by default open the Index View Home Controller application!

If you are talking about viewing IIS files, in IIS go to your application β†’ switch to content view mode β†’ go to default.aspx β†’ right click β†’ select view

-2
source

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


All Articles