How to install global isapi filters with wix? (IIS 7.5)

3

I am struggling to install a com based isapi dll globally into iis 7.5 using wix 3.6.3303.1/4.0.12.0.

I have the following wix config (full config here):

<Fragment>
  <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
    <Component Id="IsapiDll" Guid="ADD-GUID-HERE">
      <File Id="isapidll" Name="isapi.dll" Source="isapi.dll" />
    </Component>
    <Component Id="IisFilter" Guid="ADD-GUID-HERE">
      <CreateFolder />
      <iis:WebFilter Id="IisFilter" Name="MyIsapi" Path="[INSTALLFOLDER]isapi.dll" LoadOrder="last" Description="MyIsapi" />
    </Component>
  </ComponentGroup>
</Fragment>

I receive the following error in my msi log when running on Windows 7 32bit with IIS7.5:

WriteIIS7ConfigChanges:  Error 0x8007000e: Failed while finding IAppHostElement filter/@name=(null)
WriteIIS7ConfigChanges:  Error 0x8007000e: Failed to delete filter
WriteIIS7ConfigChanges:  Error 0x8000ffff: Unexpected IIS Config action specified for global filter
WriteIIS7ConfigChanges:  Error 0x8000ffff: Failed to configure IIS filter global.
WriteIIS7ConfigChanges:  Error 0x8000ffff: WriteIIS7ConfigChanges Failed.

I fear the problem is a bug in wix itself. CreateGlobalFilter() passes pwzFilterName to DeleteCollectionElement() before it has been assigned a value. This later causes Iis7FindAppHostElementString() to be called with a null wzAttributeValue value which appears to be the cause of the error.

I could of course be on a wild goose chase and be happy to be pointed in the right direction...

Update: I've now played with website level installs and have that working with the addition of the WebSite attribute and element. Config here

Edit: Changed path attribute to correct format.

wix
iis-7.5
isapi
asked on Stack Overflow Dec 17, 2012 by Richard Oliver • edited Dec 18, 2012 by Richard Oliver

2 Answers

2

0x8007000e means out of memory and the (null) in the message makes me bet this is a bug in the custom action. If you can debug it that's ideal. In any case, entering a bug at http://wixtoolset.org/bugs would probably be a good idea.

answered on Stack Overflow Jan 7, 2013 by Rob Mensching
0

You forgot to add WebSite attribute, this code works well for me in WIX3.7:

<Component Id="IsapiFilterComponent" Guid="AE102719-D7DE-450A-A44C-29E7D9A36C0D" KeyPath="yes">
  <iis:WebFilter Id="MyWebDavFilter" Name="MyWebDavFilter" Path="[INSTALLFOLDER]MyWebDavFilter.dll" LoadOrder="last" Description="My Web Dav Filter" WebSite="DefaultWebSite" />
</Component>

but this

<Component Id="IsapiFilterComponent" Guid="AE102719-D7DE-450A-A44C-29E7D9A36C0D" KeyPath="yes">
  <iis:WebFilter Id="MyWebDavFilter" Name="MyWebDavFilter" Path="INSTALLFOLDER]MyWebDavFilter.dll" LoadOrder="last" Description="My Web Dav Filter"/>
</Component>

gives the same error you have.

Of course, you have to add <iis:WebSite> element to your wxs file.

answered on Stack Overflow Feb 15, 2013 by Anton

User contributions licensed under CC BY-SA 3.0