views:

580

answers:

2

I'm trying to use NAnt/NAntContrib build script to build a web application on Windows 2008 (IIS 7.0).

In the build file, there is mkiisdir task, which fails with:

[mkiisdir] The webservice at 'localhost' does not exist or is not reachable.

All the documents/posts I found so far (non for w2k8, only Vista) say to install IIS 6 Compatibility services (all of them, including scripting tools, etc.) So I did, but it still throws this error.

Any idea what else need to be changes, so NAnt be able to create/delete virtual directories on IIS 7.0?

EDIT: New data - when I log in as local administrator to this server, the nant task succeeds, but it fails when I log in as a domain admin. I have added the domain admins group in the local Administrators group, but it still fails. Any idea what other permissions I need to check/change in order to make my domain admin user to be able to execute this task? I can create manually virtual folders without any problems.

+1  A: 

To answer my own question - I have isolated the part of the code in NantContrib which was causing the problem, and made a sample application to test.

I have posted this as a separate question here, and there is the solution as well.

Cheers

Sunny
Have you found this to work when it's not localhost? Meaning the machine your targeting mkiisdir with is not the one running the NAnt process?
Scott Saad
A: 

In order to get iis nantcontrib tasks to work you need to install IIS6 Management Compatibility Tools. Here is the blog describing how to do it in Vista:

http://thoughtworker.in/2008/01/15/nant-the-webservice-at-localhost-does-not-exist-or-is-not-reachable/

Here is a screenshot of how to do it in Windows Server 2008:

alt text

Igor Zevaka
Actually I did it (it's written in the question itself). There was additional problem, and the solution is in my answer. Thanks for the input though.
Sunny
Oh yeah you did, i must have skimmed the OP poorly :))
Igor Zevaka