I've done a bit of hunting.  Error 0x80005000 is E_ADS_BAD_PATHNAME.

At about line 180 of IISTasks.cs in the DeterminIISSettings method there
is a loop:
            // enumerate all websites on webserver
            foreach (DirectoryEntry website in webServer.Children) {
                if (website.SchemaClassName == "IIsWebServer") {
                    if (this.MatchingPortFound(website)) {
                        websiteFound = true;
                    }
                }
The _serverInstance value is initialized to "1" which is the value I
think should be used to specify the default web server, which is where
the site folder to delete lives.  The MatchinePortFound method has:
            if (_serverPort == Convert.ToInt32(bindingParts[1],
CultureInfo.InvariantCulture)) {
                _serverInstance = website.Name;
                return true;
            }

If I read the code right this means the _last_ website found will
determine the _serverInstance.  If I have more than one site configured
to use port 80 (which I do) then this loop might not get the site I
expect.  On my machine the site name for the second site is "61823" or
something like it.  So of course the directory for which I search is not
found.

I think having two sites on the same machine listening to port 80 might
not be a normal configuration.  I could see it might even be an error,
but I am not expert, yet, at IIS configuration.  If I have a bad
configuration then problem solved.

I wonder, though, for the sake of an extra cycle or two, would it be
better to terminate the first loop when websiteFound becomes true?

OTOH, if it is legitimate to have more than one site listening on port
80, this loop doesn't do the job, does it?

Thank you for your time and attention.
------------------------------------------------------------------------
-------- 
Skip Sailors 
Lead Software Engineer 
Harland Financial Solutions Mortgage Solutions Group 
[EMAIL PROTECTED] 
http://www.harlandfs.com 
425.250.1994 
I'm not sayin' anything, I'm just sayin'


-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 08, 2004 10:38 PM
To: Skip Sailors; [EMAIL PROTECTED]
Subject: Re: [Nant-users] <deliisdir> uncooperative

Skip,

I'll try to have a look at this later today.

Gert

----- Original Message ----- 
From: "Skip Sailors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 09, 2004 12:44 AM
Subject: [Nant-users] <deliisdir> uncooperative


I tried to manage my web sites with a script that includes a
<deliisdir/> task.
<deliisdir vdirname='/WebForNAntToPlayWith'
verbose='true'/>
What I get in response is:

[deliisdir] Deleting virtual directory '/WebForNAntToPlayWith' on
'localhost:80'.

BUILD FAILED

C:\Project files\AnotherWeb\default.build(35,4):
Error deleting virtual directory '/WebForNAntToPlayWith' on
'localhost:80'.:
NAnt.Core.BuildException: C:\Project
files\AnotherWeb\default.build(35,4):
Error deleting virtual directory '/WebForNAntToPlayWith' on
'localhost:80'. ---> System.Runtime.InteropServices.COMException
(0x80005000): Exception from HRESULT: 0x80005000.
   at System.DirectoryServices.Interop.IAdsContainer.GetObject(String
className, String relativeName)
   at System.DirectoryServices.DirectoryEntries.Find(String name, String
schemaClassName)
   at NAnt.Contrib.Tasks.DeleteIISDirTask.ExecuteTask() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp3BA9.tmp\src\Tasks\IISTasks.cs:lin
e 895
   --- End of inner exception stack trace ---
   at NAnt.Contrib.Tasks.DeleteIISDirTask.ExecuteTask() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp3BA9.tmp\src\Tasks\IISTasks.cs:lin
e 901
   at NAnt.Core.Task.Execute() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp125A.tmp\src\NAnt.Core\Task.cs:lin
e 177
   at NAnt.Core.Target.Execute() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp125A.tmp\src\NAnt.Core\Target.cs:l
ine 249
   at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies) in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp125A.tmp\src\NAnt.Core\Project.cs:
line 876
   at NAnt.Core.Project.Execute() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp125A.tmp\src\NAnt.Core\Project.cs:
line 833
   at NAnt.Core.Project.Run() in
C:\DOCUME~1\drieseng\LOCALS~1\Temp\tmp125A.tmp\src\NAnt.Core\Project.cs:
line 902

I'm not sure what I'm doing wrong.  The folder is there, and marked as a
web in IIS Admin.  The Error Lookup tool doesn't know what 0x80005000
is.  Please help.  What's wrong with my machine?

TIA
------------------------------------------------------------------------
-------- 
Skip Sailors 
Lead Software Engineer 
Harland Financial Solutions Mortgage Solutions Group 
[EMAIL PROTECTED] 
http://www.harlandfs.com <http://www.harlandfs.com/>  
425.250.1994 
I'm not sayin' anything, I'm just sayin'





-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to