How can I prevent VS2012 from running IIS Express for any debug? - debugging

I am running VS2012 (Ultimate version 11.0.51106.01 Update 01) and do have a website project along with some console, WPF and WCF server projects. My normal debugging runs a non website project and rarely do I debug the website project.
Any debugging however, always starts IIS Express. How can I prevent that? The website project "Web" tab forces me to select some web server and "IIS Express" is currently selected, but I don't want it to start unless I'm debugging the website. Seems like this started happening after some recent VS2012 maintenance as I don't remember it happening before about a few weeks ago. Now getting old.
Is this a VS2012 bug that any debugging fires up IIS Express?
Anyway to not start it when I debug a WPF or console app?

Related

How do I get IIS Express to work in Windows 8?

So I've been working at this for about 2 days now and have essentially hit a dead end. I guess the first thing to know is, can IIS Express work in combination with Visual Studio 2010 and Windows 8?
I just got this new laptop in, with Windows 8 pre-installed. I installed Visual Studio 2010 Ultimate, SP1, and MVC 3. I had to enabled .NET Framework 4.0 myself...
I have a project that I transferred from my old computer (windows 7) to this computer. It was set up to run on IIS Express. So when I opened the project, VS2010 said that I was missing some components and asked if I wanted to install them--so it installed IIS Express for me. When I try to run my project, I get a "This page can't be displayed" page in IE. In fiddler, I get
- 302 HTTP localhost:16683 /
- 502 HTTP Tunnel to localhost:443
the SSL URL for the project is https://localhost:44300/
the URL for the project is http://localhost:16683/
If I go to IISExpress in my system tray and select the https link there, it opens the website up just fine. If I select the http link there, it get that "502 HTTP Tunnel to localhost:443" line in fiddler again... Why is it trying to tunnel to localhost:443???
Another thing to note is that I decided to create a test MVC 3 project from scratch to see what IIS Express would do. I set the project to run on IIS without enabling SSL. When I run the project is starts up just fine. When I click the logon link, it tries to redirect to an https link with port 44300...when it shouldn't be. I created a test project for the same purpose on my windows 7 machine, and the project did not do this.
The last thing to note is that after going to the https link for my initial project via the IIS Express tray icon, if I click the logon link for the test project, it now takes me to my initial project's https link... It's as if the projects are crossing over into each other...

Unable to start debugging on the web server after installing SharePoint

Visual studio 2010 was debugging fine on Win 7 , 64-bit machine. after installing sharepoint foundation 2010. SP site r working fine. but mvc, aspnet projects showing follwoing error
Unable to start debugging on the web server. the web server cound lnot find the requested resource.
thanks,
When SharePoint is installed the default web site in IIS is replaced by the SharePoint default site. Create a whole new website (and also an application pool preferrably) for yourself in IIS and deploy your code there and try debugging it. It should work.
From my past experience you cannot use an MVC template on a sharepoint environment (i.e. sharepoint iis site)
There are a few add-ons and customizations you can do, but their quite tedious.

Visual Studio 2010 published web site returns "Could not load assembly App_Web_xxxxxx.dll"

I am working on client's application in which we have two servers - development server and testing server. We first develop applications on development server and then publish it and host it on test server for client testing.
Testing server has Microsoft .NET framework 3.5 SP1. On development we have Visual Studio 2010.
We publish the website on development server using VS 2010 and then copy that folder to testing server and host it on its IIS.
Whenever we try access any aspx page of site hosted on testing server, we get error:
Could not load assembly App_Web_xxxxxx.dll". Make sure it is compiled before accessing the page
What can I do to resolve this?
This could be due to a lot of reasons.
I would start by trying one of the following things..
Make sure your IIS Site has the correct .net version specified - same as your application
Make sure you have all the required .net components installed in windows features (control panetl)
Look at event viewer for more errors and post it here
OK guys here is the solution.
Since my testing server is having Microsoft .NET framework 3.5 so on the development server while publishing from VS 2010, I have to choose target framework as 3.5.
Do this:
Right click web site -> Property Page -> Build -> Change the target framework.
After doing this setting, publish the web site again.

Visual Studio 2010 nasty caching Cassini? Must manually stop service

I've spent waaaay too much time trying to figure this out. I'm running Windows 7 and Visual Studio 2010 in a VMware Fusion virtual.
When I debug my website project, Cassini (aka ASP.NET Web Development Server) starts and the site shows in my default browser (IE). I stop the debugger, make some tweaks to my C# code, and start the debugger again. The website starts up in IE and the site displays, but its using the code base from when I initially debugged NOT including any tweaks in code between the initial debug/build and subsequent debugs/builds.
The only way I can get code changes to build and run in the browser properly is if I manually stop the ASP.Net Web Development Server from the tray and then run debug.
Has anyone encountered this? Not sure if its caused by VS2010 or the environment being a virtual on a Mac.
Manually stopping Cassini after every debug is really starting to suck.
Thanks.
Check if Visual Studio is set to recompile the projects when there are changes.
Check that Tools > Options > Projects and solutions > Build and run > On run, when projects are out of date is set to Always build.
Perhaps you will have a more pleasant experience with IIS 7.5 Express as a replacement for Cassini.
From that page:
IIS Express is a lightweight,
self-contained version of IIS
optimized for developers. IIS Express
makes it easy to use the most current
version of IIS to develop and test
websites. It has all the core
capabilities of IIS 7 as well as
additional features designed to ease
-- website development including:
-- It doesn't run as a service or
require administrator user rights to
perform most tasks.
-- IIS Express works well with ASP.NET and PHP applications.
-- Multiple users of IIS Express can work independently on the same
computer.
Here's an article to help you get started.
Figured this out. I had mapped my Visual Studio 2010 folders to a VMware Fusion share in order to make my .NET projects accessible from Mac world (for copying graphics files into the projects, etc.). Evidently there was some type of permission issue or something that did not result in any sort of alert that was causing the problem.
I remapped all VS folders (Project, Website, etc.) into the standard Documents folder of my user instance and everything began working as expected.
Thanks for the help.

Cannot start debugger on Visual Studio 2010 (F5) However, ' attach to process' does work (slow). How to fix?

The environment:
Clean (new) install of Windows 7 64bit.
Clean (new) install of Visual Studio 2010 Professional (10.0.30319.1).
Windows Update is up to date.
The problem:
I cannot start the debugger on Visual Studio 2010 (hit F5): 'Unable to start debugging on the web server. Unable to connect to the web server. Verify that the web server is running and that incomming HTTP requests are not blocked by a firewall.'
However, 'attach to process' (what I usually do) does work, but it is painfully slow to start (Visual Studio 'thinks' a lot of time before the debugging is actually enabled).
On the same hardware, running VS 2008 on good old Windows XP (32bits), this problem never happened.
Trying to debug a site running under the ASP.NET Development Server also fails: 'Unable to connect to ASP.NET Development Server.'.
There are plenty of web pages about these errors (many very outdated and does not apply to my environment), none of them worked for me.
Notes:
No matter if I run Visual Studio as Administrator or not. The problem is
the same.
The problem happens even when running a brand new blank IIS web site, either created as 'localhost/something' or 'sample.local'.
If I create a 'File System' web site (to try ASP.NET Development Server), when I hit F5, the server starts, but after a long wait Visual Studio says 'Unable to connect to ASP.NET Development Server.'
The 'hosts' file has an explicit 127.0.0.1 entry for 'localhost' and for 'sample.local'
It's the same problem either running .NET 2.0 or 4.0.
It's the same either configuring the application pool with or without 'Enable 32-Bit Applications' true or false.
It's the same either configuring the application pool is classic or integrated mode.
In a desperate attempt, I've added all the IIS 6.0 legacy 'features' stuff (not needed!) and doesn't helped at all.
I don't now what else I can try.
Thanks.
OMG!, I'm so stupid. The most oblivious thing was truly wrong. There was a wrong rule in the firewall. Therefore, even being in 'interactive mode' (as it is was always set), the connection was denied.

Resources