Unable to start debugging on the web server. Debugging failed because integrated Windows authentication is not enabled

Recently, I was trying to get a .Net 2.0 web application I am working on, running from IIS 7 under my Vista Ultimate workstation so it could be remotely debugged. I went and changed the appropriate project settings, but when ran the web app, it said:

Error while trying to run project: Unable to start debugging on the
web server. Debugging failed because integrated Windows authentication
is not enabled.

After some poking arround in IIS 7, which I am quite unfamiliar with, I found a very easy solution.

  1. Right-click on “My Computer” and select “Manage”
  2. Under “Services and Appliccations” select “Internet Information Services”
  3. Find the appropriate website (probably called “Default Web Site”)
  4. Find the icon named “Authentication” and double-click it.
  5. Make sure “Windows Authentication” is in the list, and enable it.

Your Visual Studio should now works as advertised.

Using NSIS to Install an ASP.NET Web Application to IIS

One of the main projects I have been working on recently has been a .Net 3.5 web project.  While I have always liked the agile development and IDE which .Net and Visual Studio provide, The Setup Project template (which creates MSI installation files) has always been hard to use, difficult to customise and very restrictive.

In the past, I’ve used the NSIS (Nullsoft Scriptable Install System), which:

… is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.(http://nsis.sourceforge.net).

However, despite the great number of resources and example scripts to do anything you can pretty-well imagine, a simple straight up installer script to modify IIS using NSIS to install the web application seems to be quite a challenge.

I did, however, stumble across a blog faced with a similar issue, wanting an installer system to perform the following tasks:

  • Show ‘Hello’ page
  • Ask to select virtual directory name and installation folder
  • Ask about database connection string (user name, password etc)
  • Copy working files to destination folder
  • Create Virtual Directory
  • Create Database
  • Show ‘Installation complete’ page
  • Open installed application in web browser

They provided an example script which I repost here should the direct link ever go down.  They do mention on their blog a number of future enhancements missing from the installer script:

There are many things should be improved in installer. First is improvement of virtual folder creation. User should have possibility to choose between different virtual servers. Also correct default installation directory should be suggested (now it hardcoded as “C:\Inetpub\wwwroot\TargetProcess2”). Installer should detect if .Net 2.0 is installed and help to download and install it. Installer should upgrade old version of TargetProcess to new.

Given that I have quite a bit of experience with NSIS, I think those points should be mostly trivial and I will be sure to post the updated example script to this blog once it’s complete.

This url http://weblogs.asp.net/krobertson/archive/2004/04/01/106002.aspx looks promising, not exactly what I want to do but a useful reference never-the-less.