首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Wix中找到baseAddress?

如何在Wix中找到baseAddress?
EN

Stack Overflow用户
提问于 2012-12-17 18:09:22
回答 1查看 659关注 0票数 1

我有一个使用Wix进行设置的Wcfservice。

在安装过程中,我有一个图形用户界面,它收集不同的设置,然后在Product.wxs中更改这些设置。但是我很难找到我想要更改的baseAddress设置。

我的配置文件有这个部分:

代码语言:javascript
复制
<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>

当我尝试更改设置时,我使用的代码是:

代码语言:javascript
复制
<!--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”

显然,到节点的路径是错误的,但我看不出是怎么回事,有人能帮我吗?

EN

回答 1

Stack Overflow用户

发布于 2012-12-17 19:37:30

就是这样,一个简单的拼写错误。双斜杠没有任何区别。但在path中更改为serviceModel确实做到了。

然后我发现了另一个错误,我在设置值时不需要connectionString=,只需要:

Value="EVENTREPORTINGADDRESS_VALUE“

谢谢!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13912048

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档