1

セットアップに Wix を使用する Wcfservice があります。

インストール中に、さまざまな設定を収集し、Product.wxs でこれらの設定を変更する GUI があります。しかし、変更したい 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 in XML file」というエラーが表示されます。

明らかにノードへのパスが間違っていますが、方法がわかりません。誰か助けてもらえますか?

4

1 に答える 1

0

以上、単純なスペルミスでした。ダブルスラッシュは何の違いもありません。しかし、パス内の serviceModel に変更しました。

次に、別のエラーを見つけました。値を設定するときに connectionString= は必要ありません。

値="[EVENTREPORTINGADDRESS_VALUE]"

ありがとう!

于 2012-12-17T11:37:30.440 に答える