0

" " は、ブラウザでファイル アドレスを指定The service certificate is not provided. Specify a service certificate in ServiceCredentials.したときに表示されるものですsvc

以下に示すように、serviceCredentials証明書は必要ないため、私のセクションにはコメントが付けられています (これはある本の例にすぎません)。でもどうやら避けられないらしい…どうしよう。

basicHttpBindingセッションのサポートが必要なため使用できません

私のバインディング:

<wsHttpBinding>
   <binding name="BindingToViewer" sendTimeout="00:25:00">
      <security mode="Message">
         <message clientCredentialType = "None"/>
      </security>
   </binding>
</wsHttpBinding>

私のサービス:

<service name="SomeNs.Whatever.ServName" behaviorConfiguration="NoPrinPermMode">
   <endpoint address="" binding="wsHttpBinding"
                   bindingConfiguration="BindingToViewer"
                   contract="SomeNs.Whatever.IMyInterface">
      <identity>
         <dns value="localhost" />
      </identity>
   </endpoint>
   <host>
      <baseAddresses>
         <add baseAddress="https://localhost/"/>
      </baseAddresses>
   </host>
</service>

私のサービスの振る舞い:

<serviceBehaviors>
   <behavior name="NoPrinPermMode">
      <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
      <serviceAuthorization principalPermissionMode="None" />
      <!--<serviceCredentials>
         <serviceCertificate
            findValue = "MyServiceCert"
            storeLocation = "LocalMachine"
            storeName = "My"
            x509FindType = "FindBySubjectName"/>
      </serviceCredentials>-->
   </behavior>
</serviceBehaviors>
4

2 に答える 2

1

ベース アドレスに https を使用しないでください。

<add baseAddress="https://localhost/"/>

代わりに使用してください:

<add baseAddress="http://localhost/"/>

httpsGetEnabled を削除します。

<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />

に:

<serviceMetadata httpGetEnabled="True" />

サービスを認証する必要がないため、IDを削除します

      <identity>
     <dns value="localhost" />
  </identity>

編集 削除も

 <security mode="Message">
    <message clientCredentialType = "None"/>
  </security>
于 2013-09-13T19:45:01.757 に答える