Browse With ... option not available in ASP.Net MVC Project

I'm sure this is a simple misunderstanding, but I am trying to change the default browser in Visual Studio 2010 from Firefox (my default computer) to IE so that VS stops debugging when the window closes.

Based on ScottGu 's post on this, I expect the option "Browse with ..." when I right-click on an aspx page in my MVC application; but there is no such option.

Also (possibly unrelated), when you try to start the ASP.Net configuration, the Cassini Development Server starts, but the launch of the browser instance does not start. Getting very upset!

+3
source share
4 answers

Asp.net MVC does not allow you to do this

You can only see "Browse with ..." when you right-click on the root of the Default.aspx application . Otherwise, it simply does not exist.

This menu item is obviously not stupid and does not allow you to view a certain view, because it is not up to the browser to request a specific view, but up to a controller that can display any (or any) view ... So Visual Studio does not gives you this opportunity in your presentations.

I suppose it would be better if you change the default browser on your development machine.

+4
source

ASP.NET MVC 1 Default.aspx, " ...".

ASP.NET MVC 2 Default.aspx. - ASP.NET , .

+3

MVC 2 . - Default.aspx , "...", IE, Default.aspx. , ( ) .

+1

You can add the app_offline.html file to your MVC3 application. This is useful because if you rename it to app_offline.htm and deploy it, it will cause IIS to refuse all requests to the application (and return the contents of the app_offline.htm (l) file).

If you have one of them, you can right-click it to get a viewing option with an option. If you want to test different browsers and window sizes from VS, without a plugin.

+1
source

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


All Articles