29

This might be a stupid question, but I have a problem with Visual Studio 2013 and IIS (not Express), that the Visual Studio debugger by default uses IIS Express (iisexpress.exe) to debug code. But I do not want that, but I want to use IIS installed on my computer (w3wp.exe).

I succeeded in debugging with IIS by using Attach to Process... and then selecting All Users and then picking w3wp.exe as a process. But I need to do this every time I start debugging. Is there a way to use IIS by default? In Visual Studio 2012, everything worked well, but in VS 2013 I cannot find an option to use IIS (w3wp.exe) by default.

I am debugging a Web Site ASP.NET 4.0.

Thanks for any help!

Tommi Gustafsson
  • 1,860
  • 4
  • 17
  • 20
  • I could not find myself either. But there is VSCommands, you can easily set this up. http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece See "ATTACH TO IIS" – Spock Nov 04 '13 at 12:03
  • Actually, if I attach before debugging, it seems to set the process as default. Seems like a solution. – Tommi Gustafsson Nov 05 '13 at 13:04
  • 1
    Related question, with some additional applicable answers: http://stackoverflow.com/questions/11165258/keyboard-shortcut-to-attach-to-w3wp-exe-in-vs11 – Jon Schneider Feb 28 '14 at 19:04
  • @JonSchneider the related question and answers pertain to a Web Application Project and not to a WebSite project. I understand the question to pertain to WebSite project. The two types of projects have different configuration approaches. The Website project does not have a Properties Page with a Web Tab. – subsci Mar 18 '14 at 23:01

2 Answers2

22

If your website project was opened via IIS, it should debug the IIS process automatically. If your site exists in IIS currently, you should be able to find it via File -> Open -> Web Site.

If you opened an IIS Express based website project (or via the file system, which uses IIS Express by default), then run the site through IIS, VS doesn't know that the site is running in IIS.

Jimmy
  • 27,142
  • 5
  • 87
  • 100
  • Why is this the answer? It doesn't work. Access denied when setting up an IIS website with the same port as IIS Express that VS.NET insists on using all the time. – user3036342 Feb 16 '15 at 13:18
  • If you get an acces denied error try starting up Visual Studio as Administrator. (edited answer for typos) – apereira Feb 04 '16 at 15:08
2

In order to get this working on my setup (VS2013, IIS7, Win7) I needed to go into IIS Management Console and manually enable Windows Authentication.

nolsen311
  • 101
  • 1
  • 5