<system.serviceModel> <bindings> <netTcpBinding> <binding name="NewBinding1" /> </netTcpBinding> <wsHttpBinding> <binding name="NTLMWCF_wsHTTPBinding"> <security mode="Transport"> <transport clientCredentialType="Windows" /> </security> </binding> </wsHttpBinding> </bindings> <services> <service behaviorConfiguration="NTLMWCFBehavior" name="NTLMWCF"> <endpoint binding="netTcpBinding" bindingConfiguration="NewBinding1" contract="INTLMWCF" /> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" /> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="NTLMWCF_wsHTTPBinding" contract="INTLMWCF"> </endpoint> </service> </services> <behaviors> <serviceBehaviors> <behavior name="NTLMWCFBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel>
Here is the NTLMWCF.svc file
<%@ ServiceHost Language="VB" Service="NTLMWCF" %>
Imports System.ServiceModel
' NOTE: If you change the class name "INTLMWCF" here, you must also update the reference to "INTLMWCF" in Web.config. <ServiceContract()> _ Public Interface INTLMWCF
<OperationContract()> _ Function DoWork() As String
End Interface
' NOTE: If you change the class name "NTLMWCF" here, you must also update the reference to "NTLMWCF" in Web.config and in the associated .svc file. Public Class NTLMWCF Implements INTLMWCF
Public Function DoWork() As String Implements INTLMWCF.DoWork Return "I am @work" End Function
End Class
Imports System.Security.Cryptography.X509Certificates
‘if you change the application pool to run under classic pipeline mode in IIS7, the following call to the WSHttpBinding will fail.
<system.serviceModel>