views:

1388

answers:

4

In IIS Manager under Web Service Extensions, ASP.NET v2.0.50727 is set to "Prohibited" by default. I would like to set this to Allow during the install.

I am currently using WiX Version 2.

I have tried using:

<Component Id="Allow_WebServiceExtension_ASP.NET_2.0" DiskId="1" Guid="02247363-E423-41E1-AC15-BEF589B65A4D">
    <WebServiceExtension Id="WebServiceExtension_ASP.NET_2.0" Allow="yes" File="%SystemRoot%\Microsoft.NET\Framework\[DOTNETFRAMEWORKVER]\aspnet_isapi.dll" Description="ASP.NET v2.0.50727" UIDeletable="no" />
</Component>

This adds a second ASP.NET 2.0.50727 entry and does not enable the first.

A: 

Use the WebApplicationExtension Element in WIX, it's in the IISExtension, need to add the reference to the WIX project.

CheGueVerra
I have tried using: <WebServiceExtension Id="ASP.NET" Allow="yes" File="C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" Description="ASP.NET 2.0.50727" UIDeletable="yes" />This adds a second ASP.NET 2.0.50727 entry and does not enable the first.
Friend Of George
A: 

I ended up putting the following code into a custom action:

Dim WebSvcObj As Object
Dim LocatorObj As Object = CreateObject("WbemScripting.SWbemLocator")
Dim ProviderObj As Object = LocatorObj.ConnectServer(".", "root/MicrosoftIISv2", "", "")
WebSvcObj = ProviderObj.get("IIsWebService='w3svc'")
WebSvcObj.EnableWebServiceExtension("ASP.NET v2.0.50727")

It may not be pretty, but it does work.

Friend Of George
A: 

I had the same problem using wix3. Since I haven’t found any other solution (??) I decided also to do it with a custom action. With the little difference that I use c# and the WMI support of the framework (System.Management). using WMI to configure IIS

OK I found out that I just had two misstakes in my Wix 1. the @Group was missing -> I set it to "ASP.NET v2.0.50727" 2. The path to the file was wrong. I had one backslash to much. After fixing these issues wix-iis:WebServiceExtension worked perfect for me.

uli78
Could you please post the entire line of code?
Friend Of George
Here is the complete line that works for me:<iis:WebServiceExtension Id="ExtensionASP2" Group="ASP.NET v2.0.50727" Allow="yes" File="[NETFRAMEWORK20INSTALLROOTDIR]aspnet_isapi.dll" Description="ASP.NET v2.0.50727"/>
uli78
A: 

I modified the code to enable my .NET 4.0 Web Service Extension, using vbScript:

    Dim LocatorObj
    Dim WebSvcObj
    Dim ProviderObj

    Set LocatorObj = CreateObject("WbemScripting.SWbemLocator")
    Set ProviderObj = LocatorObj.ConnectServer(".", "root/MicrosoftIISv2", "", "")
    Set WebSvcObj = ProviderObj.get("IIsWebService='w3svc'")
    WebSvcObj.EnableWebServiceExtension("ASP.NET v4.0.30319")
Bon