首页 > 代码库 > Metadata publishing for this service is currently disabled.

Metadata publishing for this service is currently disabled.

Reason 1:

In your web.config

<service name="A.B.C">

but your class is:

namespace A.B{    .....    public class D : E    {

Those names need to match! The name= attribute on the <service> tag in config must be exactly what your service class is called - fully qualified, including namespace - so in your case here, it should be:

<service name="A.B.D">

 

Reason 2:

Make sure Web.config have httpGetEnabled or httpsGenEnabled parameter in <serviceMetadata> tag.

<behaviors>      <serviceBehaviors>        <behavior>          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->          <serviceMetadata httpGetEnabled="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="false"/>        </behavior>      </serviceBehaviors>    </behaviors>

 

Metadata publishing for this service is currently disabled.