WCF issue with POST using ssl (https)

I currently have a WCF binding to webHttp that works fine via http, I can make Post larger because of my webconfig settings, now I'm trying to use it on top of https (ssl), now I'm working fine, but my messages arenโ€™t they work, it doesnโ€™t work when the file size exceeds a certain amount, I was wondering why this could be, since my webconfig sets a larger size and works well on http, here is my corresponding webconfig .. any suggestions

thanks

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

+4
source share
1 answer

If you want to use webHttpBinding over SSL, then you will configure the binding to use transport security, for example:

 <security mode="Transport"> 

This link provides some details with a sample configuration to resolve the following error:

Could not find a base address that matches the http scheme for the endpoint with WebHttpBinding. Schemes of registered base addresses [https]

Example configuration from the 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> 
+8
source

Source: https://habr.com/ru/post/1301130/


All Articles