none
How to add a rest and soap endpoint to my web service RRS feed

  • Question

  • Dear all,

    I have build default WCF service hosted under IIS with by default is providing a SOAP endpoint as myservice.svc url.

    I need to get my service expose either as REST url and SOAP url. For that I try to follow this link :

    http://jaysongo.wordpress.com/2013/01/02/exposing-wcf-services-with-soap-and-rest-endpoints/

    But my problem is that my config file does not contain Enpoint section configuration has it is using by default Protocol mapping.

    Here is my web config :

    <system.serviceModel>
    		<behaviors>
    			<serviceBehaviors>
    				<behavior>
    					<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
    					<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
    					<!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
    					<serviceDebug includeExceptionDetailInFaults="true"/>
    				</behavior>
    			</serviceBehaviors>
    		</behaviors>
    		<protocolMapping>
    			<add binding="basicHttpsBinding" scheme="https" />
    		</protocolMapping>
    		<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    	</system.serviceModel>

    From that point how can I configured my rest and soap enpoint as describe in link above ?

    regards

    Thursday, May 22, 2014 10:06 PM

Answers

  • Hi,

    >>But my problem is that my config file does not contain Enpoint section configuration has it is using by default Protocol mapping.

    Yes, because when we click the wcf service application template, then by default it will host the wcf service in IIS with the basichttpbinding, so there is no enpoint section configuration. But we can add it manually.

    Then you can just copy the config file in the link to your config file. But please remember to modify the service name and contract name with your service name and contract name.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 23, 2014 10:20 AM
    Moderator