How to set IE as default browser for mvc3 application - asp.net-mvc-3

I have set IE as my default browser but when I run the ASP.Net MVC3 application it opens by default IN Mozilla Firefox. How can I set that when I run the MVC3 application so it opens in IE by default instead?

If you are running the application from within Visual Studio you can right-click an html/aspx file outside of the Views directory and select 'Browse With'. From here you can change the browser that your app will launch with when you run the app from within Visual Studio.

You can't set the default for only a single application. You set the defaults for protocols. In this case, you want to set the default for http. The easiest way is to go into IE, goto the options menu (gear) > Internet Options > Programs tab > Set IE as the default

Just encountered this question, and while the other answers helped to a point, I found myself without any aspx pages in my mvc app.
Changing the default browser through internet settings didn't work, so in the end, I added a web form manually, right-clicked in and selected 'Browse With' and then was able to set the default from there.

Apparently from Visual Studio 2012 and up, you can choose it in the toolbar:
As explained in Visual Studio 2010 keeps changing my default browser:
In earlier versions, you could use a Visual Studio extension called World of VS Default Browser Switcher , as a solid workaround to the problem.

I found this tool where you can view your application either in IE, Chrome, Firefox, etc. Check it here: How to view your MVC Application in different browsers

Related

How to show / unhide Web Essential bar from chrome?

I've checked autohide and the bar disappeared but now how can I see it again?
It's enough to press CTRL from inside Chrome.
To see the Web Essentials menu in Chrome when using Visual Studio 2015:
Ensure you've installed Web Essentials 2015 - https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2
Click the 'View in Browser' button in Visual Studio to view your site:
The Web Essentials menu will appear as an overlay at the bottom of your web page
Press CTRL in Chrome to toggle the Web Essentials menu on or off
CTRL works inside of Internet explorer as well.
Note that you have to have BrowserLink enabled. Otherwise Ctrl doesn't do anything.
Note, this feature is no longer available in Visual Studio 2017 update 3 as the author, madskristensen states:
It was removed for several reasons.
It interfered too much with the DOM of the running page
It didn't work when the various features were split out into their own extension
I build this Chrome extension to replace it
Link to image of evidence is below.(Not enough rep to show image on post)
Author of web essentials explaining why the tool bar is not suitable for the browser
Link to issue on github
There is a WebEssentials2015-Settings.json file which contains default settings for web essentials (e.g. for VS2015 it is \AppData\Roaming\Microsoft\VisualStudio\14.0\WebEssentials2015-Settings.json).
After I clicked autohide the only way for me to bring the web essentials menu back in the browsers was to edit this file setting the ShowMenu to true ("ShowMenu": true). That fixed the issue for me.
One note though, this file seems to be read on VS startup so you may need to restart VS to see the difference. Also these settings can be separately set for each solution (Web Essentials > Create solution settings). This option creates the .json file specific for given solution.

How do I set something in Visual Studio 2013 Express for Web so that running it in debug mode opens home page?

Running Razor, MVC5, .Net 4.5.1. I have no idea what constitutes a "start page" in MVC within the visual studio development environment. How do I set it so that every time I run F5 my home page opens?
Setting a startup page for MVC5 when debugging
This can be done in the Project Properties.
Open Solution Explorer and find the relevant project.
Right-click on the project and choose Properties (or press Alt+Enter).
Navigate to Web -> Start Action.
Explanation
By default an MVC application has the Specific Page radio button selected and the input box is blank. This means that the application will open a browser to the server with no page specified and MVC will use the default route of /Home/Index.
http://localhost:12345/
You can specifiy a different route. For example you could use Home/About (see image).
This would open
http://localhost:123456/Home/About

Default Browser- Visual Web Developer Express 2010

I am trying to debug a Windows Azure WebRole which is an MVC3 project, but I want it to launch in any browser of my choice.
The Windows Azure is set as the Startup Project and launches the MVC3 project WebRole.
I am using Visual Studio Web Developer Express 2010.
I have previously stabbed in the dark by setting the following properties as in the image below but to no avail:
I then decided to set the project to not independently launch a page as above.
Is there a way to setup a default browser with the above scenario AND without changing my Windows default browser?
I've gotten around this in the past by adding in an ASPX or HTML page to the project and then right clicking it and selecting Browse With. You can then change the default browser in there without having to change your default browser within windows.
I haven't tried this with the Express edition however, but I don't see why they wouldn't include it in there.
You can delete the file afterwards and it will still retain the setting.
How about this:
WoVS Default Browser Switcher
http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921
You right on the page shown in solution explorer and then browse with whatever browser you want to set and add it as default browser.

How to launch silverlight with IE in Visual Studio while Google Chrome stays default for usual browsing

I cannot debug silverlight with Google Chrome. I don't want to change default browser to IE for my normal internet browsing.
How to only ask to run IE when running a silverlight project in Visual Studio ?
In Visual Studio you can specify the browser to use when running a web project. Right click on the start webpage in your web project and click on the Browse With option.
In the dialog that appears click on Chrome and set it to default.
This will not change you default browser in Windows.
Right Click on ClientBin it is in your Projectweb.and change the default browser or remove the un wanted browser then click ok. Thats it.
or
ProjectWeb->Browse with->change the default browser->ok
Or, just install the IETab extension for Chrome, then set it to automatically run the Silverlight page in IE mode.
https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd

How to switch default browser for debug asp.net in visual studio 2008 / 2010?

Since system install the default browser was opera but suddenly become IE in both 2008 and 2010 versions. Default browser in my system is opera. How I can switch make Opera default for debug again?
In Visual Studio 2010 you can right click any aspx file in Solution Exlorer and you get an option of Browse With in the Context menu. Select Browse with and you get the list of browsers in the system. There you can select the default browser.
Add an otherwise unneeded HTML page to your app via right-clicking the project and selecting Add > HTML Page, then right-click that page and select "Browse With" For more detail, see Runscope API Tools' answer here: Set Google Chrome as the Debugging Browser in Visual Studio

Resources