【发布时间】:2023-03-27 05:32:01
【问题描述】:
我在app.config 中有一个 WCF 服务被一个 Windows 服务冲洗
<services>
<service behaviorConfiguration="serviceBehavior" name="AgileServer.AgileService">
<endpoint address="AgileService" binding="basicHttpBinding" name="basicHttp" contract="AgileServer.AgileService" />
<endpoint binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:24453/AgileService" />
</baseAddresses>
</host>
</service>
当我尝试向我的服务添加服务引用时(通过单击“添加服务引用”提示中的“发现”),URI 显示为 http://localhost:33908/AgileService.svc 我希望我的服务使用 http://localhost:24453/AgileService 作为 URI .我怎样才能做到这一点?
【问题讨论】:
标签: c# .net wcf .net-4.0 service-reference