Reputation: 729
Within the installer I'm going to have a checkbox called 'SSLValue'
If SSLValue is checked then i need to add in additional configuration to my web.config file which is created by the installer
However I'm unsure how / if the installer can handle such a request
I've seen from here that you can add in a expression for if but doesn't really explain how to use them
Here is the code I have so far which at the moment isn't working
?if [SSLValue] = "True"?>
<util:XmlFile
Id="XMLConfiguration34"
File="[VersionFolder]web.config"
Action="setValue"
ElementPath="//configuration/system.web/httpCookies/@requireSSL"
Value="false"
Sequence="8"/>
<?endif?>
Has anyone done anything similar who could help?
Upvotes: 0
Views: 218
Reputation: 1886
The steps are:
Add control checkbox in the UI.
<Control Id="SSLValueCheckBox" Type="CheckBox" X="11" Y="90" Width="116" Height="17" Property="SSLValue" Hidden="no" CheckBoxValue="1" Text="Click Me"/>
Then, Inside the component element where "XMLConfiguration34" is located add a Condition:
<Condition>
<![CDATA[SSLValue = "1"]]>
</Condition>
And that's it.
Hope it helps...
Upvotes: 1