Reputation: 33
I am working on discoverable WCF service with integrated windows authentication. It works normal when it was on basicHttpBinding, but I needed to use sessions. Since basicHttpBinding does not support them, I looked into wsHttpBinding. So, I had to change http to https, but no discovery now :( Service is visible in browser and in test client, but UdpDiscovery does not find it :(
My web.config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
</appSettings>
<system.web>
<authentication mode="Windows"/>
<authorization>
<deny users="*"/>
</authorization>
<compilation targetFramework="4.5" debug="true"/>
<httpRuntime targetFramework="4.5"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="OMS_Behavior">
<serviceAuthenticationManager authenticationSchemes="Anonymous"/>
<serviceDiscovery>
</serviceDiscovery>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="endpointBehaviorConfiguration">
<!-- Add scopes used to identify the service -->
<endpointDiscovery enabled="True"/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding_IMetaService">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Windows"/>
<message clientCredentialType="Windows"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<protocolMapping>
<add binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IMetaService" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
<serviceActivations>
<add service="OMS.Service.MetaService" relativeAddress="~/OMS.Service.svc"/>
</serviceActivations>
</serviceHostingEnvironment>
<services>
<service behaviorConfiguration="OMS_Behavior" name="OMS.Service.MetaService">
<endpoint address="~/OMS.Service.svc" behaviorConfiguration="endpointBehaviorConfiguration" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IMetaService" name="Main" contract="OMS.Service.IMetaService">
</endpoint>
<endpoint behaviorConfiguration="endpointBehaviorConfiguration" name="udpDiscovery" kind="udpDiscoveryEndpoint"/>
</service>
</services>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="false"/>
</system.webServer>
</configuration>
What should I do in this situation?
Upvotes: 1
Views: 315