0

I want to set my project to be run in IIS, because the development server has caused false positives when going to production.

However, I don't want my less paranoid colleagues to be forced into this. Can I turn off the development server launching when I attach to iis, without forcing it on my colleagues?

DevelopingChris
  • 39,797
  • 30
  • 87
  • 118

2 Answers2

1

If I understand the question, you are running into the problem where your local changes to web.config keep getting checked into source control... so if you setup the compilation node for debugging in web.config then check it in, the change will affect other developers?

It is one of the more annoying things about web apps. The technique I use is to just beat the crap out of any of my developers that check in local settings to web.config.

Seriously though... one technique that I've used before is to just limit permissions in source control so that only a master admin account can check in changes to it.

Regular developers don't have rights to change that particular file in source control.

The devs manually remove the read-only flag for their local copy of web.config so they can make any necessary changes for their environments (connection stings, debug settings, etc)... but they cannot check in those changes by accident to source control.

If a change is really needed to the web.config file then we have to log in with the master admin account to make the change.

Stephen M. Redd
  • 5,378
  • 1
  • 24
  • 32
0

Hmm, I'd be interested to know what the default server for your project is - because surely it's one of those options?

Anyway. There's a "long way round" to what you want to do:

  1. In IIS Manager, point a site to the root of your project, getting the application up and running from there (if you're on WinXP, take a look at IISAdmin.Net, a great tool for setting up multiple sites on XP).
  2. From Visual Studio, build your site (or if it's a Web Site, make sure everything is saved).
  3. Request a page from the site in your browser of choice.
  4. In Visual Studio go to:
    1. Debug or Tools
    2. Attach to Process...
    3. Select w3wp
    4. Attach

You'll now be debugging the website worker process.

If you are running IIS on a remote machine and you're using VS2k8, you'll need to ensure you have the Visual Studio Remote Debugging Monitor installed on the remote computer - the files can usually be found in your VS2k8 install directory:

\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger

(There's an installer around somewhere, but I can't seem to find it at the moment).

Zhaph - Ben Duguid
  • 26,785
  • 5
  • 80
  • 117
  • going through older questions: so I attach to process but all other projects in the solution will launch the dev server so I have all this crap launching when I attach, I want ot turn that off, but not hose up my colleagues, so I want a non-destructive, "don't start development server" setting for all my web apps in visual studio. – DevelopingChris Nov 21 '10 at 14:29
  • Not really - if you manually attach the debugger to the IIS process, then that's all you should be doing. However, if you press F5 to start a debugging session then yes, that will indeed start up the development server. – Zhaph - Ben Duguid Nov 22 '10 at 09:05
  • Another option now might be to take a look at IIS Express - recently released as a standalone from WebMatrix: http://www.microsoft.com/web/gallery/install.aspx?appid=IISExpress – Zhaph - Ben Duguid Nov 22 '10 at 09:07