Using wsHttpBinding, WCF is ignoring my web.config

Posted by Prabu_Spark under WCF on 6/5/2013 | Points: 10 | Views : 1336 | Status : [Member] | Replies : 0
Hi sir,


I am trying to create a WCF service that requires session support so I added a section in my web.config to enable wsHttpBinding. But when I test the service in the WCF Test Client and check the config it seems to have taken the default auto generated config instead of my own.

See my config :

<?xml version="1.0"?>
<configuration>
<system.web>

<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>

<behaviors>
<serviceBehaviors>

<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>

<services>
<service name="UserService">
<endpoint address="" binding="wsHttpBinding" contract="ICenterPlaceUserService" />
</service>
</services>

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

And the result :

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICenterPlaceUserService" sendTimeout="00:05:00" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:57418/L1.WCF/CenterPlaceUserService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICenterPlaceUserService"
contract="ICenterPlaceUserService" name="BasicHttpBinding_ICenterPlaceUserService" />
</client>
</system.serviceModel>

What am I missing ?

[Note: I created wcf service using wshttpbinding but if test using wcftestclient, it shows only basic http binding. How can i view my
wshttpbinding in wcftestclient using web.config]

Kindly give me the solution for this problem.

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

(No response found.)

Login to post response