伙计们,
使用 WCF 的无文件服务激活时如何启用服务发现?使用这种方法,似乎无法指定显式端点类型或行为配置?
我目前的尝试如下,但服务发现仍然无法正常工作:
<bindings>
<wsHttpBinding>
<binding name="Default" transactionFlow="true">
<security mode="Transport">
<transport clientCredentialType="None">
</transport>
</security>
</binding>
</wsHttpBinding>
</bindings>
<protocolMapping>
<clear/>
<add scheme="https" binding="wsHttpBinding" bindingConfiguration="Default" />
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceDiscovery/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior>
<endpointDiscovery enabled="true">
<scopes>
<add scope="http://XPS/MvcApplication/Service/"/>
</scopes>
</endpointDiscovery>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
<serviceActivations>
<add service="RegistrationService" factory="Core.ServiceModel.Activation.ServiceHostFactory" relativeAddress="RegistrationService.svc" />
<add service="EventService" factory="Core.ServiceModel.Activation.ServiceHostFactory" relativeAddress="EventService.svc" />
<add service="ShoppingService" factory="Core.ServiceModel.Activation.ServiceHostFactory" relativeAddress="ShoppingService.svc" />
</serviceActivations>
</serviceHostingEnvironment>