In Visual Studio 2010, how do you invoke the “View In Browser” feature on an MVC app?-Collection of common programming errors
You can configure your web applications to use IIS so you don’t have to hit F5 to run them. The IIS process will automatically start the web site for you. It’s such a time saver!
-
Right click a web project and choose Properties
-
Go to the Web tab and choose the “Use Local IIS Web server” option.
-
Enter a url like http://localhost/MyProject
-
Rebuild.
-
Navigate your browser to the url you entered.
If you want to debug your website, you can go to Debug > Attach to process…, then attach to w3wp.exe. This will attach to all web apps within your solution. (You might have to select the show processes from all uses option.) If you’ve just rebuild, you have to reload the site before IIS recycles and the breakpoints turn solid red. (If the breakpoints are ever only outlined in red that means the code running in IIS is an older build than what you are seeing. In rare cases you may have to kill the IIS process, but cleaning and rebuilding usually clears this up for me.)
Note: you’ll probably have to go into Window’s Programs and Features control panel and enable the IIS features. VS should prompt you if these aren’t configured already.