Back to Questions

What is httpGetEnabled in WCF?

Your Answer

  • 12/17/2012 10:30:30 AM
  • Biju
  • 1

What is httpGetEnabled in WCF?

It is for hiding/disclosing metadata information,

To hide meta data information set the value to false and remove the metadata endpoint above before deployment

When enabled..

http://localhost:43354/Service1.svc?wsdl will list the metadata information

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<wsdl:definitions xmlns:wsdl="" xmlns:soap="" xmlns:soapenc=""xmlns:wsu="" xmlns:xsd=""xmlns:soap12="" xmlns:tns="" xmlns:wsa=""xmlns:wsp="" xmlns:wsap=""xmlns:wsaw="" xmlns:msc="" xmlns:wsa10=""xmlns:wsx="" xmlns:wsam="" name="Service1" targetNamespace="">
<xsd:schema targetNamespace="">
<xsd:import schemaLocation="http://localhost:43354/Service1.svc?xsd=xsd0" namespace=""/>
<xsd:import schemaLocation="http://localhost:43354/Service1.svc?xsd=xsd1" namespace=""/>
<xsd:import schemaLocation="http://localhost:43354/Service1.svc?xsd=xsd2" namespace=""/>
<wsdl:message name="IService1_GetData_InputMessage">
<wsdl:part name="parameters" element="tns:GetData"/>

When disabled - you will get a message as below:

his is a Windows© Communication Foundation service.

Metadata publishing for this service is currently disabled.

If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:

1. Create the following service behavior configuration, or add the <serviceMetadata> element to an existing service behavior configuration:

        <behavior name="MyServiceTypeBehaviors" >
            <serviceMetadata httpGetEnabled="true" />



  • 12/17/2012 10:36:05 AM
  • test

Back to Questions