2012-09-23 26 views
9

です。SSLオーバーフローおよびWebHttpBindingのためにan online tutorialが続きました。「WSHttpBindingをバインドしているエンドポイントのスキームhttpに一致するベースアドレスを見つけることができませんでした」登録されたベースアドレススキームは[

同じエラーが戻ってきました。私は、以下に示すように古いWeb設定に戻りました。私のhttpsサイトは正常に動作しており、新しいポートを開く必要がないように、サイトの一部としてWCFを追加しました。私はエラーを取得するとき

私は今、このような何かに到達しようとしている:私は私のウェブアドレスを追加した後

https://localhost/_vti_bin/TestingSQL/sample.svc/mex

<?xml version="1.0"?> 
<configuration> 
    <system.serviceModel> 
<services> 
    <service name="SharePointBits.Samples.WCFService.SampleService" behaviorConfiguration="SharePointBits.Samples.WCFService.SampleServiceBehavior"> 
<host> 
<baseAddresses> 
      <add baseAddress="https://testsite/_vti_bin/TestingSQL/Sample.svc"/> 
     </baseAddresses> 
    </host> 

    <endpoint address="https://localhost/_vti_bin/TestingSQL/Sample.svc" binding="wsHttpBinding" contract="SharePointBits.Samples.WCFService.ISampleService" 
bindingConfiguration="wsHttpBindingEndpointBinding"> 
      <identity> 
      <dns value="localhost"/> 
     </identity> 
    </endpoint> 
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/> 
    </service> 
</services> 
<bindings> 
    <wsHttpBinding> 
    <binding name="wsHttpBinding"> 
     <security mode="Transport"> 
     <transport clientCredentialType="None"/> 
     </security> 
    </binding> 
    </wsHttpBinding> 
</bindings> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="SharePointBits.Samples.WCFService.SampleServiceBehavior"> 
     <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
     <serviceMetadata httpsGetEnabled="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="true"/> 
    </behavior> 
    <!--<behavior name="">--> 
     <!--<serviceMetadata httpGetEnabled="true" />--> 
    <!--</behavior>--> 
    </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration>' 

を新たにエラーが発生します。

Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [].

私が試しました両方の方法と両方にエラーがあります。

metadatabindingに絶対アドレスを追加すると、私は、このエラーを取得:

Could not find a base address that matches scheme https for the endpoint with binding MetadataExchangeHttpsBinding. Registered base address schemes are [].

:私はこのエラーを取得するベースアドレスを使用して

The HttpsGetEnabled property of ServiceMetadataBehavior is set to true and the HttpsGetUrl property is a relative address, but there is no https base address. Either supply an https base address or set HttpsGetUrl to an absolute address.

は、私が使用して上記のコードを変更しましたベースアドレス。

答えて

9

あなたはWCFに相対的だと思うが、あなたはベースアドレスを提供していないアドレスを持つMEXエンドポイントを持っています。こと、またはBaseAddressを指定して、エンドポイント上でそれを使用どちらの

<endpoint address="https://testsite/_vti_bin/TestingSQL/mex" 
      binding="mexHttpsBinding" 
      contract="IMetadataExchange"/> 

:に例えばMEXエンドポイントを変更します。

さらに、serviceMetaData要素、特にhttpsGetUrlを調整することができます。

+1

私は両方向で試しましたが、それはうまく動作せず、私はベースアドレスについて困惑しています。ベースアドレスを追加した後でエンドポイントを ""変更しようとしましたが、エンドポイントが空であるというエラーが出ました。ベースアドレスを参照してはいけませんか?間違った場所に置いたのですか?私はhttp://msdn.microsoft.com/en-us/library/ms734786.aspxを参照してください –

+1

十分な公正。 [serviceMetaData](http://msdn.microsoft.com/en-us/library/ms731317.aspx)要素をまだ調整してみましたか?特にhttpsGetUrl?または、MEXエンドポイントを一時的に削除しようとしましたか? – Jeroen

+0

はい!あなたが正しいです! httpsGetUrlを追加すると私のエンドポイントが間違っています。urlがすでに登録されているというエラーが表示されています。あなたのお時間をありがとう!ありがとう! –

関連する問題