My default browser is Firefox, and has been for many, many years. But that’s not everyone’s favorite browser, nor is the one they have to use all day long. When developing web applications for clients, it’s important to know what their browser requirements are. Often, for LOB apps or intranet apps, it’s some version of IE. In this case, I need to develop my web app using IE.
This caused conflicts for me recently as my default browser is Firefox. Whenever I would start the app (Ctrl + F5), a new tab would pop up in my Firefox browser. I didn’t want that, I wanted IE to pop up.
One way to make IE pop up is to change the Web Application Project’s Web settings:
Here I can type in the path to IE with appropriate command-line arguments. But that’s annoying and brittle, as not everyone has IE in the same location. This option doesn’t work very well.
Instead, we can set the default Visual Studio default browser, which doesn’t conflict with the machine-wide default browser. To get this set up, we’ll need to open an ASPX file in our solution.
If you don’t have one, just create one temporarily. For some reason, this option only shows up when you have an ASPX file open. The option we’re looking for isn’t anywhere in “Tools->Options”, or at least I couldn’t find it anywhere.
Finally, go to “File->Browse With…”:
This will bring the “Browse With” dialog up:
Select whatever browser you want (IE for me) to be your default, and click “Set as Default”. Now whenever I start the application from Visual Studio, the correct browser pops up. This is a Visual Studio-wide setting, so you’ll need to use this property judiciously.