Thank you, didn't think about WiX having that functionality.
However, I am having an issue with adding a brand new node. I need to add
the following under //configuration/system.webServer/handlers/add
<add name="svc-Integrated" verb="*" path="*.svc"
preCondition="integratedMode"
type="System.ServiceModel.Activation.HttpHandler"/>
I have tried the following but nothing is being created (I also tried this
without the condition but still no luck):
<Component Id="UpdateWebConfigForIIS8"
Guid="3DB3C8CE-7271-4505-83E8-F83A67011DC4"
Directory="INSTALLFOLDER_FOXPROCONNECTWS">
<Condition><![CDATA[IIS_MAJOR_VERSION >= "#8"]]></Condition>
<CreateFolder />
<util:XmlConfig Id="UpdateHandlers"
Action="create"
File="[#WebConfig]"
ElementPath="//configuration/system.webServer/handlers/add"
Name="name"
Value="svc-Integrated"
Sequence="2" />
<util:XmlConfig Id="UpdateHandlerVerb"
Action="create"
File="[#WebConfig]"
ElementPath="//configuration/system.webServer/handlers/add[\[]@name='svc-Integrated'[\]]/verb"
Value="*"
Sequence="3" />
<util:XmlConfig Id="UpdateHandlerPath"
Action="create"
File="[#WebConfig]"
ElementPath="//configuration/system.webServer/handlers/add[\[]@name='svc-Integrated'[\]]/path"
Value="*.svc"
Sequence="4" />
<util:XmlConfig Id="UpdateHandlerPreCondition"
Action="create"
File="[#WebConfig]"
ElementPath="//configuration/system.webServer/handlers/add[\[]@name='svc-Integrated'[\]]/preCondition"
Value="integratedMode"
Sequence="5" />
<util:XmlConfig Id="UpdateHandlerType"
Action="create"
File="[#WebConfig]"
ElementPath="//configuration/system.webServer/handlers/add[\[]@name='svc-Integrated'[\]]/type"
Value="System.ServiceModel.Activation.HttpHandler"
Sequence="6" />
</Component>
Can someone give me an example that I can work with?
Brian
If you can't explain it simply, you don't understand it well enough. -
Albert Einstein
On Tue, Oct 21, 2014 at 1:30 PM, John Cooper <[email protected]> wrote:
> Why are you re-inventing the wheel? Util:XmlFile and Util:XmlConfig are
> quite serviceable and give you full rollback support.
>
> Scheduling depends. There's no one magic value. Since you should be
> using a deferred action, you'll be limited to the range after CostFinalize
> to before InstallFinalize. The file must exist before you can edit it, so
> InstallFiles will need to have been run first. That leaves you after
> InstallFiles to before InstallFinalize.
>
> --
> John Merryweather Cooper
> Senior Software Engineer | Enterprise Service Applications | Continuing
> Development
> Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |
> [email protected]
>
>
>
> -----Original Message-----
> From: Brian Enderle [mailto:[email protected]]
> Sent: Tuesday, October 21, 2014 12:24 PM
> To: WiX Users
> Subject: [WiX-users] When to call CustomAction
>
> I am trying to run a CA after setting up a website to modify the
> web.config file based on the IIS version being used.
>
> What should I use for the "After" value (in the InstallExecuteSequence) to
> make sure the CustomAction executes after the website is installed?
>
> Here is the code I am using:
>
>
> <Product>
> ...
> <InstallExecuteSequence>
> <!-- Only execute on install (not repair or uninstall) -->
> <Custom Action='WebConfigProperties' After='InstallServices'>NOT
> Installed AND NOT REMOVE</Custom>
> <Custom Action='UpdateWebConfig' After='WebConfigProperties'>NOT
> Installed AND NOT REMOVE</Custom>
> </InstallExecuteSequence>
>
> </Product>
>
>
> <!-- Includes setup info for installing IIS information -->
> <Fragment>
>
> <!-- Create a component group so we only have to make one reference in
> Product.wxs -->
> <ComponentGroup Id="IISConfiguration">
> <ComponentRef Id="InstallWebsite" />
> <ComponentRef Id="InstallAppPool" />
> </ComponentGroup>
>
> <!-- Get username / password from AcctInfoDlg.wxs -->
> <!--<util:User Id="WebAppPoolUser" Name="[IISSERVICEACCOUNT]"
> Password="[IISPASSWORD]" ></util:User>-->
>
> <DirectoryRef Id="INSTALLFOLDER_FOXPROCONNECTWS">
>
> <!-- Setup application pool information using IISSERVICEACCOUNT from
> AcctInfoDlg.wxs -->
> <Component Id="InstallAppPool" Guid="$(var.AppPoolGUID)"
> KeyPath="yes">
> <iis:WebAppPool Id="FoxProConnectWS"
> Name="FoxProConnectWS"
> Identity="applicationPoolIdentity"
> ManagedPipelineMode="Integrated"
> ManagedRuntimeVersion="v4.0" />
>
> </Component>
>
> <!-- Create the website in IIS -->
> <Component Id="InstallWebsite" Guid="$(var.WebsiteGUID)"
> KeyPath="yes">
> <iis:WebVirtualDir Id="WebSiteVirtualDir" Alias="FoxProConnectWS"
> Directory="INSTALLFOLDER_FOXPROCONNECTWS" WebSite="FoxProWebsite" >
> <iis:WebApplication Id="WebSiteApp" Name="FoxProConnectWS"
> Isolation="medium" WebAppPool="FoxProConnectWS" />
> </iis:WebVirtualDir>
> </Component>
>
> </DirectoryRef>
>
> <!-- These 'website's are defined outside of the 'DirectoryRef' so as
> to create the websites under the 'Default Web Site' entry in IIS -->
> <iis:WebSite Id="FoxProWebsite" Description="FoxProConnectWS"
> Directory="INSTALLFOLDER_FOXPROCONNECTWS" >
> <iis:WebAddress Id="AllUnassigned" Port="80" />
> </iis:WebSite>
>
>
> <Binary Id="CustomAction.CA"
>
> SourceFile="$(var.SolutionDir)CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll"
> />
> <CustomAction Id="WebConfigProperties"
> Return="check"
> Property="UpdateWebConfig"
>
>
> Value="FoxProConnectWSPath=[INSTALLFOLDER_FOXPROCONNECTWS];FoxProPath=[FOXPROPATH]"
> />
>
> <CustomAction Id="UpdateWebConfig"
> BinaryKey="CustomAction.CA"
> DllEntry="UpdateWebConfigCustomAction"
> Execute="deferred"
> Impersonate="no"
> Return="check" />
>
> </Fragment>
> Brian
>
> If you can't explain it simply, you don't understand it well enough. -
> Albert Einstein
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
> NOTICE: This electronic mail message and any files transmitted with it are
> intended
> exclusively for the individual or entity to which it is addressed. The
> message,
> together with any attachment, may contain confidential and/or privileged
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or
> distribution
> is strictly prohibited. If you have received this message in error, please
> immediately advise the sender by reply email and delete all copies.
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> WiX-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users