2012-01-13 16 views
0

次のweb.configを使用してIISでいくつかのサービスをホストしました。サービスを参照することはできますが、「このサービスのメタデータ公開は現在無効になっています」というメッセージが表示されます。WCF - なぜWSDLがありません

誰でも私の間違いを見つけられますか(私はできません!)?

<?xml version="1.0"?> 
<configuration> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <services> 
     <service name="Calculator" behaviorConfiguration ="NotThrottled"> 
     <endpoint address="http://localhost/WCFTwoEndpoints/Calculate.svc" 
      binding="wsHttpBinding" bindingConfiguration="" name="Calculator" 
      contract="WCFTwoEndpoints.ICalculate" /> 
     <endpoint binding="mexHttpBinding" name="mex" contract="IMetadataExchange" /> 
     </service> 
     <service name="ThrottledCalculator" behaviorConfiguration ="Throttled"> 
     <endpoint address="http://localhost/WCFTwoEndpoints/ThrottledCalculate.svc" 
      binding="wsHttpBinding" bindingConfiguration="" name="ThrottledCalculator" 
      contract="WCFTwoEndpoints.ICalculate" /> 
     <endpoint binding="mexHttpBinding" name="mex" contract="IMetadataExchange" /> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="NotThrottled"> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     <behavior name="Throttled"> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceThrottling maxConcurrentCalls="19" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 

</configuration> 
+0

私が間違って何も見えないのですか? ? –

+1

Service要素の名前は "Calculator"で、名前は完全修飾される必要がある "WCFTwoEndpoints.Calculator"であったはずです。 – Rajesh

答えて

1

名前空間でサービス名を完全修飾していません。ただし、サービスホストを実行しようとするとエラーとして表示されるはずです。両方のサービスは、 ` `との両方のサービスもMEXエンドポイントを持っている....うーん....奇妙な.....再起動IISを含むサービスの動作を指定 -