2011-02-08 9 views
1

https上で私のWCFサービスを使用するように設定されていることがほとんどあります。 IISアプリケーションが起動していて、localhostでsvcとwsdlを読むことができます。そこで私はVisual Studioに戻り、サービスを呼び出すことのできるクライアントを作成しようとしました。 ServiceReferenceを追加すると、次のエラーが表示されます。IISホストWCFでスキームHTTPSエラーに一致するベースアドレスを見つけることができません

バインディングMetadataExchangeHttpsBindingを持つエンドポイントのスキームhttpsに一致するベースアドレスが見つかりませんでした。登録ベースアドレススキームは[http]です。

組み込みの開発サーバーとIIS Expressで試してみました。彼らは両方とも同じエラーを出しました。

は、ここに私のweb.configファイルです:

<configuration> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="TransportSecurity"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None" /> 
      </security> 
     </binding> 
     </wsHttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="SmartCook2.Server.ISmartCookServiceBehavior"> 
      <serviceMetadata httpsGetEnabled="true"/> 
      <serviceDebug includeExceptionDetailInFaults="false"/> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
    <services> 
     <service behaviorConfiguration="SmartCook2.Server.ISmartCookServiceBehavior" 
     name="SmartCook2.Server.SmartCookService"> 
     <endpoint address="https://localhost:6344/SmartCookService.svc" 
      binding="wsHttpBinding" bindingConfiguration="TransportSecurity" 
      contract="SmartCook2.Server.ISmartCookService" /> 
     <endpoint address="mex" binding="mexHttpsBinding" 
      contract="IMetadataExchange" /> 
     </service> 
    </services> 
    </system.serviceModel> 
<system.webServer> 
    <modules runAllManagedModulesForAllRequests="true"/> 
    </system.webServer> 
</configuration> 

私が間違って何をしているのですか?

+0

?サービスのベースアドレスまたはMEXアドレス –

+0

サービス参照を追加するときに、VSでDiscoverボタンを使用し、サービスがhttp:// localhost:6344/SmartCookService.svcとして検出されました'。私はまた、アドレスをhttpsに変更しようとしました。それはどちらもうまくいかなかった。 – Tenshiko

答えて

0

申し訳ありませんが、VSが正しいアドレスを発見しなかったようです。だから、サービス参照の正しいアドレスは次のとおりです。

**アドレス(URL)が**は、Visual Studioでサービス参照を作成しようとしているために使用しました

https://localhost/IISHostedSmartCook/SmartCookService.svc

関連する問題