Change default browser by project or solution in Visual Studio 2008? - asp.net

i have to work on various web projects for different customers. some use IE only, some Firefox and other browsers in their companys.
i would like to debug project/solution A with IE and project/solution B with firefox (and so on) by just hitting F5 or "view in browser".
I do NOT want to switch the default browser in visual studio via:
right click on an .aspx file in the solution explorer
browse with...
selecting the browser i want to use
pressing "set as default" to make it remember my choise (optional)
everytime i have to work on another project/solution.
Can i save the default browser by solution or project and NOT via VS global settings somehow?
do you have any hint for me how to archive this? is there maybe even an addin for this?
thanks, toebens

In the project properties, in the Web section you can have it start an external application with parameters at the start of debug (F5) so you could specify the path of the browser as the Start External program path and the http://servername:port/virtualdirectory as the command line argument
alt text http://img142.imageshack.us/img142/3708/projectprops.gif

Related

.ASPX pages markups are opening in web browser

When I double click on .aspx pages in my web application project in VS2010, instead of showing the mark up in the ide the .aspx pages are opening in the web browser as shown below. The same is happening when I run my application it opens all the .aspx pages in the web browser along the application url i.e., http://localhost123456/default.aspx. I have to close all the other pages except the http://localhost123456/default.aspx to run/ test my application. Not sure what would cause this to happen. I am not able to find any solutions so far, any help is appreciated. I used the option View Markup (Rightclick on aspx page -> view Markup) to see the markup for now.
Update
As per Mike's answer I checked the options under Open with... and I do have a Internet Explorer (Default) set as shown in the following image. Not sure how did it got there.
Deleting the Internet Explorer (Default) option might be cumbersome if I have lot of .aspx pages , if there is a way to remove this option at once for all .aspx pages rather than right clicking on each and every .aspx and remove it that would be great.
As per #JB King suggestion I did checked the file properties and all the .aspx files are set with Opens with: Microsoft Visual Studio option as shown it the image below.
Right-click any .aspx file in the project, select Open With...
In the screen that pops up, select Web Form Editor, then click the Set as Default button.
Not sure how you got Internet Explorer as an option here, but if it is there, you can just delete it. It's not applicable for loading the aspx from disk. Rather, to see the rendered page in IE, you'd do View in Browser or Browse With... (in which you can set your default browser, as well).
Your address bar shows you're loading files directly from disk. This won't work. ASP.NET is not lilke static HTML. ASP.NET applications must be run from within a webserver. Install IIS and ensure ASP.NET is installed and configured, or use the Debugging Webserver (IIS Express) in Visual Studio.
If you look at the properties of the file, there should be a line of Opens with: that is where you want to have Visual Studio rather than Internet Explorer as the issue is with which programs are mapped to what file extension. Microsoft instructions if you want those as specific steps to do.

Add external browser to Apanta Studio 3

I am trying to add an external browser to Aptana Studio 3 from preferences/Web Browsers and then NEW, which gives me the "Add External Browser" dialog.
When using the "browse" option to point Aptana to Safari in the Applications folder, it gives me a "The location value is not a valid path name" error.
location shows as: /Applications/Safari.app
If I change that to: /Applications/Safari/Contents/MacOs/Safari.app
its still gives me the error.
What should the correct pathname be?
Thanks
OK found it:
/Applications/Safari.app/Contents/MacOS/Safari
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
/Applications/Firefox.app/Contents/MacOS/firefox-bin
Somehow OP's solution didn't work out for me. However, if you edit the launch configuration using Run > Run configurations... and select your launch config, in the Main tab, where it says "Browser executable" it will actually accept something like /Applications/Google Chrome.app (just use the browse button)

How can I default to IE for testing my ASP.NET application?

Three fine browsers I have installed: the inimitable Mozilla, the traditional Internet Explorer, and the hot new Chrome. I love them all dearly, but when testing my ASP.NET application, I would prefer to do so using IE.
Please note, I've not deployed this application. I'm merely launching it from the Visual Studio project in which it was conceived. Would someone here be so good as to suggest a way in which I might specify the browser it launches in? Thank you.
Right-click on any .aspx page in Solution Explorer and choose Browse With...
You can then select Internet Explorer from the list and choose 'Set as Default' to make pages open with IE when you press F5.
Click and ASPX file in your solution explorer
Go > File > Browse with.. > Select IE then set it as your defautl browser.
Run your project.

how i can change default browser when running .net projects

net project then it runs in mozilla. I want to change that setting & i want in internet explorer, how i can do this?
Thank you.
From File menu, select Browse with..., and choose your default browser.
Be sure to have a web site project loaded and selected otherwise the option won't show up.
Just Right-Click on a folder or a .aspx file in your project and Choose "Browse with..." from there. Then set your desired browser as default via the "Set as Default" button and click browse. That's it.
Next time you start debugging the site will open in your default browser.

How can I get chrome to stop caching when working on an aspx file in visual studio

I'm currently editing some html/css within a aspx file inside of Visual Studio 2010. I'm using Chrome as my browser. When I make changes inside of Visual Studio and save/ctrl + F5 to run it frequently fails to load the new updated .css file due to pulling old cached versions of the CSS.
I've used visual studio as my primary HTML editor before but when I work with pure html/css files I just save and refresh the file in chrome and it will refresh the updated css 100% of the time. I've only started to experience this problem when working with aspx files and running things via ctrl + f5. Anyone have any ideas of how I can fix this?
Go to project properties, Web tab
Choose Start External Program in the Start Action section
Paste or browse to the path for Google Chrome (Mine is C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe)
In the Command line arguments box put -incognito
If you would like the browser to open a specific page, then you will need to set the Visual Studio Development Server to use a specific port (ie 4066) then change your command line arguments to include that address, for example: -incognito localhost:4066/Default.aspx
Incognito Mode should prevent caching between sessions and even tabs.

Resources