Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Sunday, May 29, 2011

WCF Service failing with “The server has rejected the client credentials”.

Great article regarding an issue that happens a lot

Sunday, February 20, 2011

WCF Contract - Overloading Methods



If you need to overload a funtion in WCF contract , you've probably encountered in :


Cannot have two operations in the same contract with the same name, methods ***** and ****** in type ******* violate this rule. You can change the name of one of the operations by changing the method name or by using the Name property of OperationContractAttribute


Here's how to fix this issue (second option)

http://www.switchonthecode.com/snippet-tutorials/wcf-snippet-tutorial-overloading-methods

Sunday, February 13, 2011

2 Endpoints for netTcpBinding with different contracts

Need to use same netTcpBinding binding but need additional endpoint for different contract? here's how:

1. It's very good to read this article
2. If you have current netTcpBinding it should look like this:



3. what you have here is a TCP type of WCF with base address. Thats a deafult implementation of netTcpBinding.
4. I suggest you to use the VS20010 tool "Edit WCF Configuration" to edit the App.config file instead of manually edition it.
5. Add additional end point same values as the 1'st netTcpBinding binding (leave the MexTcpBidingEndpoint alone)
6. Change the folowing :

  • give each endpoint a name (the default implementation keeps them empty , it's good to give them some name to know on which one you are working on
  • for each give a unique name in the address section , thats the magic here , giving the base address (see host baseaddress section) allownig wach binding to "sit" in a unique position within the service , leaving this section empty will cause assertion such as "When multiple endpoints on a service share the same ListenUri, those endpoints must all have the same Identity in their EndpointAddress."
  • For each binding state the contract.
7. the app.config script should look like this:


8. Thats it , Cool , no?

 
Home | About | Link | Link
Simple Proff Blogger Template Created By Herro | Inspiring By Busy Bee Woo Themes