Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

In my project i am consuming the java service in .net side . so i have to pass the header . using App.Config i able to pass the header .but i have to remove the App.config file ,without the App.config file i have to pass the header using c# .


For Example :
<bindings>
<basichttpbinding>
<binding name="NewBindng">
<security mode="Transport">



<client>
<endpoint address="http://localhost:8162/Emp/Index">
binding="basicHttpBinding" bindingConfiguration="Newbinding"
contract="MyProject.Service"name="SearchGlobalAssociateV2">
<headers>
<wsse:security xmlns:wsse="#unknown">
<wsse:usernametoken>
<wsse:username>satheesh
<wsse:password>kumar


<ns1:subscriptionenforcement">
<ns1:subscriberid xmlns:ns1="#unknown">
<subscriberid>Gmail

<ns1:consumerid xmlns:ns1="#unknown">
<consumerid>Google


</headers>

Posted

 
Share this answer
 
Here is the solution.

http://omegacoder.com/?p=1075[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900