Remove header node from WCF respone? RRS feed

  • Question

  • Hello,

    Guys I have aN IIS hosted WCF service from which I want to remove header node from the WCF response as highlighted below.

    Remove highlighted header

    In order to do that, I had followed following thread Suppress header  but got stuck on below error while browsing the service.

    below is my web.config details

            <binding name="wsSecureBinding">
              <security authenticationMode="UserNameOverTransport"> 
             <reliableSession />  
                <httpsTransport />
    <service name="Xxxxxxxxx.DPNService" behaviorConfiguration="defaultProfile">
            <endpoint address="SEWServices" binding="customBinding" bindingConfiguration="wsSecureBinding" name="wsSecureService" contract="XXXXXXXX.DPN.IDPNService" />
                <add baseAddress="https://XXXXXXXX/SEWServices" />
            <behavior name="defaultProfile">
              <serviceMetadata httpGetEnabled="true"  httpsGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
                <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="XXXXXXX.AuthSoapHeader, xXXXXXX.DPN" />

    Sachin Vashishth

    Wednesday, July 25, 2018 2:14 PM

All replies