Luis.Andrade
Luis.Andrade

Reputation: 318

WCF - C# - SOAP How to change port name?

Im new in WCF. I've been trying to do this but no success yet.

I have to expose a service but I'm having some troubles trying to change the name of the port in the WSDL.

enter image description here

This is my Webconfig

enter image description here

Sorry about my english and I'll realy appreciate the help.

Upvotes: 0

Views: 1211

Answers (1)

Luis.Andrade
Luis.Andrade

Reputation: 318

I did it. If you need to solve this problem all you have to do is this:

  1. This is how the system.serviceModel tag of the webconfig looks like. enter image description here

  2. This is how my service contract looks like enter image description here

  3. This is the class PortNameWsdlBehaviorExtension that inherit from BehaviorExtensionElement. This class is specified in the webconfig

I most add that my service and the PortNameWsdlBehaviorExtension class are in the name space myNameSpace.

enter image description here

Upvotes: 1

Related Questions