#32 <mkiisdir> fails with 'Exception from HRESULT: 0x80005006'

Current CVS
open
nobody
Tasks (29)
5
2006-02-14
2006-02-14
Ivan Minchev
No

Here is example project:
<project name="testprj" default="mkiisdirtest">
<target name="mkiisdirtest">
<mkiisdir dirpath="c:\temp" vdirname="vdir/vsubdir" />
<mkiisdir dirpath="c:\otherdir" vdirname="vdir" />
</target>
</project>

NAnt output:
....
[mkiisdir] Creating/modifying virtual directory
'vdir/vsubdir' on 'localhost:80' (website: ).
[mkiisdir] Creating/modifying virtual directory 'vdir'
on 'localhost:80' (website: ).

BUILD FAILED

D:\Builds\nantcontrib-0.85-rc3-bin\nantcontrib-0.85-rc3\bin\default.build(4,4):

Error creating virtual directory 'vdir' on
'localhost:80' (website: Default WebSite).
Exception from HRESULT: 0x80005006.
...

The problem is that after excuting first task, NAnt
creates 2 DirectoryEntry objects: first for 'vdir' with
SchemaClassName 'IIsObject' and second for 'vsubdir'.
when excuting second task NAnt is trying to modify
first object which is generic and does not support
virtual directory properties.

Here is my suggestion for solution:
GetOrMakeNode method in class CreateVirtualDirectory
could be modified first to check if SchemaClassName of
found DirectoryEntry is matching to thet you want to
create/modify and if not to make new and to copy
existing childs to it.

Discussion

  • Ivan Minchev
    Ivan Minchev
    2006-02-14

    Modified CreateVirtualDirectory class

     
  • Charles Chan
    Charles Chan
    2010-02-18

    This bug does not actually refer to a bug in NAnt, but indirectly to NAntContrib.