I am trying to combine enablewebscript and clientcredentials in a single wcf endpoint behavior so that I can fetch a x509 certificate via thumbprint. But when I define both the above mentioned tags in a single endpoint behavior, the service is not working as expected.
Is there any way to combine enablewebscript and clientcredentials in a single wcf endpoint behavior?
<behaviors>
<endpointBehaviors>
<behavior name="CombinedBehavior">
<enableWebScript />
<clientCredentials>
<!-- Configure your client credentials settings -->
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
This is not working for me.
As far as I know,
<enableWebScript>
enables the endpoint behavior that makes it possible to consume the service from ASP.NET AJAX web pages.To call a WCF service from an ASP.NET AJAX client, the service must be configured with the
WebHttpBinding
and theWebScriptEnablingBehavior
must be added to the endpoint behavior collection. This can be done in configuration by adding the WebScriptEnablingElement in service-side like below:So you can't combine
<enableWebScript>
and<Clientcredentials>
together.More details could be found in this docs: https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.configuration.webscriptenablingelement?view=netframework-4.8.1