1
我有一個使用Wix進行安裝的Wcfservice。如何在Wix中查找baseAddress?
在安裝過程中,我有一個Gui收集不同的設置,然後在Product.wxs中更改這些設置。但是我很難找到我想改變的baseAddress設置。
我的配置文件有本節:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Default">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Default" name="OurServiceLibrary.OurService">
<clear/>
<endpoint name="OurBasicHttpBinding" address="basic" binding="basicHttpBinding" contract="OurServiceLibrary.IOurService" listenUriMode="Explicit"/>
<host>
<baseAddresses>
<!-- The base-address must be updated with the correct url for the hosting machine. -->
<add baseAddress="http://localhost:8081/ourservice"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
而且我使用,當我嘗試更改設置代碼:
<!--Put path to settings in local variable-->
<?define ServiceModelSettingsPath="//configuration/system.ServiceModel/services/service/host/baseAddresses/" ?>
<!--Modify settings with values entered in the installation UI-->
<util:XmlFile Id="ModifyServiceBaseAdress"
Action="setValue"
Permanent="yes"
ElementPath="$(var.ServiceModelSettingsPath)/add"
Name ="baseAddress"
File="[#OurServiceSettingsFile]"
Value="connectionString=[SERVICEBASEADRESS_VALUE]"
SelectionLanguage="XPath"
Sequence="1" />
當試圖運行安裝程序,我得到一個錯誤說「找不到節點://configuration/system.ServiceModel/services/service/host/baseAddresses//add XML文件」
很顯然,節點的路徑是錯誤的,但我看不到, C有人幫助我嗎?
ServiceModel - serviceModel區分大小寫的問題?我不認爲//添加後的雙斜槓會影響它。 –