WCF报错[当前已禁用此服务的元数据发布]的解决方法

出现这个错误一般是你的webconfig文件里把wcp服务的配置给删除了.
解决方法就是重新添加上就好了.
代码如下:

<system.webServer>
<modules runAllManagedModulesForAllRequests=”true” />
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled=”true” />
<behaviors>
<serviceBehaviors>
<behavior name=””>
<serviceMetadata httpGetEnabled=”true” />
<serviceDebug includeExceptionDetailInFaults=”false” />
</behavior>
</serviceBehaviors>
</behaviors>
<!–<serviceHostingEnvironment multipleSiteBindingsEnabled=”true” aspNetCompatibilityEnabled=”true” />–>
</system.serviceModel>