我似乎在使用我在IIS上托管的WCF时出现问题。 当在浏览器中直接进入它时,我得到了#34;此服务的元数据发布目前已被禁用。"但它指出我应该尝试的所有步骤,他们不会工作。任何人都可以指出我正确的方向,我可以采取另一步调试它。我的Web.config如下。 (如果它有所作为,这是使用WD Express 2010)
感谢。
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="ServiceBehavior" name="Service">
<endpoint address="basic" binding="basicHttpBinding" name="httpEndPoint" contract="IService1"/>
<endpoint address="json" binding="webHttpBinding" behaviorConfiguration="webBehavior" name="webEndPoint" contract="IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="ServiceAspNetAjaxBehavior" contract="IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="ServiceAspNetAjaxBehavior">
<enableWebScript />
</behavior>
<behavior name="webBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" aspNetCompatibilityEnabled="false"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>