How to make IIS Express the default web server in Visual Studio? - visual-studio-2010

Is there a way to set IIS Express as the default launch option in Visual Studio 2010 SP1? Currently, it uses Visual Studio Development Server by default and one has to execute "Use IIS Express..." command manually.

Right click on the Default Startup project file in your Solution explorer.
Select "Properties".
Click on the Web Tab on the left hand side
scroll down and select the "Use Local IIS Web server radio button
Tick the checkbox "Use IIS Express"
Another useful tid bit in the section is that you can tell IIS not to launch browsers when you debug and just wait for a browser process to hit it. This is really nice for cross-browser testing.
Just above the previous said section, look for a radio button titled "Don't open a page. Wait for a request from an external app" under Start Action section of the same page
EDIT:
To set all projects made to behave this way do the following:
Tools -> Options
Projects and Solutions
Web Projects
Tick "Use IIS Express for new file-based web sites and projects

Related

Visual studio 2013 performance wizard, change default browser

When I launch the performance wizard, it opens Internet Explorer. But I want to use Google Chrome instead. Here is how I open the performance wizard. There is no menu for choosing browser.
You can attach it to a process. On the Performance Explorer:
Right click on the project
Attach/Detach
Select what is running the project - w3wp.exe for IIS or iisexpress.exe for IIS Express. If you don't see any of them you should tick both checkboxes (Show processes for all users / Show Processes in all sessions

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

Visual Studio 2012 change web browser

If I click control-click a hyperlink in the text editor, it opens the URL in a new Visual Studio tab. I would rather the link open outside Visual Studio in my system's default web browser (happens to be Google Chrome). How can I arrange this?
I'm talking about hyperlinks in code comments.
I am using Visual Studio 2012. I found a similar question dated 2009, however the accepted answer (a macro) doesn't work in Visual Studio 2012.
Frustratingly, this isn't possible in Visual Studio 2012 or 2013.
Bug reported to developers at http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2723548-open-links-in-an-actual-browser Please add your vote!
There is an extension Open in External Browser.
I'm using Visual Studio 2013 Professional. It works for me.
To install:
Go to "Tools" - "Extension and Updates..."
Choose "Online" - "Visual Studio Gallery" on left pane
Type in search field "open in external browser"
Click "Install"
It seems that it is not possible (except if your default browser is IE, so you would not know the difference).
As Anand wrote above, you could ctrl + right click on the link and then select open link in external window (you cannot do that on the start page, only on an opened webpage) but it still opens the window in IE no matter what your default browser is.
Even if you go to TOOLS --> Options --> Environment --> Web Browser, you will notice that it indicated that IE and the internal VS web browser are siblings.
So just copy the URL from the address bar and paste it to your default browser (it's not too much trouble in my opinion).
In VS 2012 Professional, on the toolbar next to the run debug icon, is the word 'Start' which can be expanded. When expanded you have the option to 'Open with...' and you can select the browser to open the web project up in. It does not run the debugger, it only opens the website in the selected browser. (toolbar > Start (expanded) > Open with...)
You can use the default browser switcher application if you are using Visual Studio 2010 for this kind of situation:
On your tool bar menu select "TOOLS"
Then from options choose "EXTENSION Manager"
It will open the extension manager window in the left hand side there are options choose the "Online Gallery" option
In Online Gallery search for "WoVS Default Browser Switcher"
Download it and Install it
After download restart VS
Hope this works best for you
I found a way to change the default browser for all actions in Visual Studio Express 2012 for Web. It's documented here:
By default, Visual Studio uses your default browser to test pages. To use a different browser or Page Inspector, right-click [an .aspx] page in [the] Solution Explorer and then click [...] Browse With [, which] lets you select a browser from a list, add new browsers to the list, or set one as the default browser. (The default browser setting here applies only to the Visual Studio environment and not to Windows.)
This also changes the default browser for F5'ing an MVC project, because I'm used to closing IE to stop debugging. When I let Visual Studio use my system's default browser, I first have to switch back to it from my browser to stop debugging, because closing the browser tab doesn't.
Unfortunately it still doesn't open links in comments in a browser.
I don't actually know what you mean under hyperlink, but you can easily make VS2012 working with another browser by simply.. uninstalling IE9 (Control Panel->Software->Windows components->bye bye IE9).
Well I found a workaround that is not so clean :P
Add a .html file to your project
Open the new .html file and click inside the editor.
Now Goto 'File' > 'Browse With...' from the Visual Studio Top Menu.
In the 'Browse With' Window, select the desired browser and click
the 'Set as Default' button.
Click the Browse button to set the new default selection.
This is what you have to do:
Go to the standard menu toolbar
Click on 'Add or Remove Buttons'
Tick the 'Debug Target' option
VS 2012 -->> File -->> Browse With -- >> Select Browser -->> Click on "set Default" Button -->> Now Click "Browse" Button
Go thru this setting...
Hope this will help you

Attach to process in VS2010 express using a web site. Is it possible?

I have read this article but it applies to web projects with a .csproj... What about a 'web site'?
http://www.ninjatrader.com/support/forum/showthread.php?t=15671
People at work here tell me to just response.write my way to debug the web sites but I really miss the attach to process that is in the professional edition of vs2010.. or maybe I have to get used to response.write debugging?
(Reason I am not debugging is ektron 8.0 does not compile is vs2010.. so I must attach to process.. or use vs2008)
Visual Studio 2010 Express Edition supports Attach to process but it is available only in Expert Settings.
Go to Tools->Settings->Expert Settings.
After this change, you should see Attach to Process button in Debug menu.
It isn't available for VS2100 Express. Check the link. http://msdn.microsoft.com/en-us/library/vstudio/c6wf8e4z(v=vs.100).aspx
An option for websites hosted on another application (Like IIS) is to use the property pages.
Right Click on Project/Website in Solution Explorer->Property Pages->Start Options
Launch VS2010 Express (or VS2012 Express) as Administrator
Set "Start Action" radio-button to "Don't open a page. Wait for a request from an external application."
Set "Server" radio-button to "Use Custom Server"
Set the "Base URL" textbox to your site url.
Verify the Debuggers: ASP.NET option is checked.
Hit F5 to launch the debugger, then request the page in the browser.
Then, linking to the website is as easy as pressing the play-debug button and navigating to your url.
NB: This was tested in VS Express for Web 2012 (ver. 11.0.50727.1) on a Web Site project.
Just like said in the post above, you can use "Attach to process" in visual studio express. But it's not necessary to change your settings to "expert settings". All you have to do is add the command to the debug menu.
Tools-> Customize -> Commands -> Menu bar: Debug -> Add Command... -> Debug -> Attach to Process
Try this:
right click on toolbar/menu Customize/tab Commands/button Add Command/left list Debug/right list Attach to Process.../button OK/button Close.
for me works crtl-alt-p shortcut too.
.. voila!

Choose browser to launch when debugging ASP.net (Visual Studio)

Is there anyway to have Visual studio start up a certain browser when running asp.net project?
Open any Web Form
File->Browse With...
Select from the list and hit "Set as Default"
yes
navigate to any aspx file in solution explorer
Right click browse
with and set your default browser
See here

Resources