Domanda

Al momento ho un servizio riposante WCF vincolante webHttp, funziona benissimo su HTTP, posso fare post di grandi dimensioni a causa delle mie impostazioni webConfig ora sto cercando di utilizzare più HTTPS (SSL), ora il mio ottiene funzionano bene , ma i miei post non, doesnt lavoro quando la dimensione del file è oltre un certo importo, mi chiedevo il motivo per cui questo potrebbe essere dato che il mio webconfig specifica una dimensione più grande e funziona bene sul http, ecco la mia webconfig rilevante .. qualche suggerimento

Grazie

<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>

È stato utile?

Soluzione

Se si desidera utilizzare webHttpBinding su SSL allora hai configurare il binding per utilizzare la protezione trasporto come:

<security mode="Transport"> 

fornisce alcuni dettagli con config campione a che fare con il seguente errore:

  

Impossibile trovare un indirizzo di base che corrisponde schema http per la   endpoint con webHttpBinding vincolante. schemi di indirizzo base registrata   sono [https]

config di esempio dal 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>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top