How to add a custom HTTP header to every WCF call?

后端 未结 13 2297
不知归路
不知归路 2020-11-22 05:33

I have a WCF service that is hosted in a Windows Service. Clients that using this service must pass an identifier every time they\'re calling service methods (because that i

13条回答
  •  情歌与酒
    2020-11-22 06:20

    If you just want to add the same header to all the requests to the service, you can do it with out any coding!
    Just add the headers node with required headers under the endpoint node in your client config file

      
        
          
          Value  
           
       
    

提交回复
热议问题