所以我很困惑什么服务端点和主机基地址。在我到目前为止所走过的所有例子中,他们都讨论了如何使用所需的绑定来设置端点,并且您通常可以导航到这些端点WCF服务端点vs主机基地址
Hoever当我使用以下配置来设置和托管我的服务时,公开主机基地址。
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="HostService.EvalService">
<endpoint address="http://localhost:8080/basic"
binding="basicHttpBinding" contract="HostService.IEvalService" />
<endpoint address="http://localhost:8080/ws"
binding="wsHttpBinding" contract="HostService.IEvalService" />
<endpoint address="mex" binding="mexHttpBinding"
name="mex" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/EvalsService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
有人可以向我解释这个吗?
我应该还是能够导航到端点?目前我不能 –
您将无法导航到浏览器中的端点,但端点仍处于活动状态,客户端应该能够正常连接。 –
我不知道为什么MS没有在他们的怪异文档中陈述你的一些子弹。 – PositiveGuy