WCFTest Issues

Coordinator
Jan 8, 2008 at 1:19 AM
Edited Jan 10, 2008 at 10:53 PM
Please post any issues with the WCFTest program
Jan 17, 2008 at 8:46 PM
Sorry. English is not my first language.

Everything works fine. Nevertheless, when the proxy class is created to consume the service, in the Web.config file two endpoint entries are created. If you use the default constructor (without parameters) it will generate an exception. You must be use the overload that allows to you establish the name of the endpoint, for example:

--------------------------------------
Web.config
--------------------------------------
<client>
<endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_IWCFTestCoreService"
contract="ServiceReference1.IWCFTestCoreService" name="WebHttpBinding_IWCFTestCoreService" />
<endpoint address="http://localhost/dnn470/DesktopModules/WCFTest/CoreService.svc/mex"
binding="wsHttpBinding" bindingConfiguration="mex" contract="ServiceReference1.IWCFTestCoreService"
name="mex" />
</client>

--------------------------------------
Example.cs
--------------------------------------
IWCFTestCoreService client = new WCFTestCoreServiceClient("mex");
Console.Write(client.HelloWCF("Alvaro"));
Console.Read();
Coordinator
Jan 17, 2008 at 9:53 PM
Thank you for the feedback. We will correct this.
Coordinator
Jan 20, 2008 at 5:38 PM
Again thank you for your feedback. This configuration should correct the problem:

<system.serviceModel>
<bindings>
<mexHttpBinding>
<binding name="mexHttpBinding" />
</mexHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultBehavior">
<serviceMetadata httpGetEnabled="true" />
<workflowRuntime />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="DefaultBehavior"
name="DotNetNuke.Modules.WCFTest.CoreService">
<endpoint address=""
binding="mexHttpBinding"
name="WCFTestCoreService"
contract="DotNetNuke.Modules.WCFTest.IWCFTestCoreService"
/>
</service>
</services>
</system.serviceModel>