none
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


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


    Sachin Vashishth




    Wednesday, July 25, 2018 2:14 PM

All replies