Question

J'ai actuellement un service reposant WCF contraignant webHttp, il fonctionne très bien sur http, je peux faire après de grandes tailles en raison de mes paramètres de webConfig, maintenant, je suis en train de l'utiliser sur https (ssl), maintenant mon obtient beau travail , mais mes messages ne faites pas, cela ne fonctionne pas lorsque la taille du fichier dépasse un certain montant, je me demandais pourquoi cela pourrait être que mon webconfig spécifie une plus grande taille et il fonctionne bien sur http, voici ma webconfig pertinente .. suggestions

Merci

<system.serviceModel>
<client>
  <endpoint binding="webHttpBinding" bindingConfiguration="webHttp"
    contract="PrimeStreamInfoServices.IService1" name="Client" />
</client>
<bindings>
  <webHttpBinding>
    <binding name="webHttp" maxBufferSize="15000000" maxBufferPoolSize="15000000"
      maxReceivedMessageSize="15000000">
      <readerQuotas maxDepth="15000000" maxStringContentLength="10000000" 
        maxArrayLength="15000000" maxBytesPerRead="15000000" maxNameTableCharCount="10000000" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="string" />
      </security>
    </binding>
  </webHttpBinding>
</bindings>
<services>
  <service behaviorConfiguration="PrimeStreamInfoServices.Service1Behavior"
    name="PrimeStreamInfoServices.Service1">
    <endpoint address="" binding="webHttpBinding"
      bindingConfiguration="webHttp" contract="PrimeStreamInfoServices.IService1" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="PrimeStreamInfoServices.Service1Behavior">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
      <serviceCredentials>
        <!--
        <serviceCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" findValue="TempCa" />
          -->
      </serviceCredentials>

    </behavior>
  </serviceBehaviors>
</behaviors>
<diagnostics>

  <messageLogging logMalformedMessages="true"  logMessagesAtServiceLevel="true"
    logMessagesAtTransportLevel="true" />

</diagnostics>

Était-ce utile?

La solution

Si vous souhaitez utiliser webHttpBinding sur SSL, vous avez configurer la liaison à utiliser la sécurité du transport comme:

<security mode="Transport"> 

fournit quelques détails avec config exemple pour traiter l'erreur suivante:

  

Impossible de trouver une adresse de base qui correspond à http système pour la   point final avec une liaison WebHttpBinding. schémas d'adresse de base inscrits   sont [https]

config Exemple du blog:

<system.serviceModel>
<behaviors>    
 <endpointBehaviors>
  <behavior name="TestServiceAspNetAjaxBehavior">
   <enableWebScript />
  </behavior>
 </endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
 <service name="TestService">
  <endpoint address="" behaviorConfiguration="TestServiceAspNetAjaxBehavior"
   binding="webHttpBinding" bindingConfiguration="webBinding" contract="TestService" />
 </service>
</services>
 <bindings>
   <webHttpBinding>
     <binding name="webBinding">
       <security mode="Transport">
       </security>
     </binding>
   </webHttpBinding>
 </bindings>
</system.serviceModel>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top