0

Iam trying to make a WCF service for api over basicHttpBinding to be used over https. my web.config

 <bindings>
  <customBinding>
    <binding name="ServiceComPortBinding" receiveTimeout="02:00:00"
       sendTimeout="02:00:00"
       openTimeout="02:00:00"
       closeTimeout="02:12:00">
      <transactionFlow transactionProtocol="WSAtomicTransactionOctober2004"/>
      <security defaultAlgorithmSuite="Basic128" authenticationMode="UserNameForCertificate" requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true" keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" requireSignatureConfirmation="false">
        <localClientSettings cacheCookies="true" detectReplays="true" replayCacheSize="900000" maxClockSkew="01:00:00" maxCookieCachingTime="Infinite" replayWindow="01:00:00" sessionKeyRenewalInterval="10:00:00" sessionKeyRolloverInterval="01:0:00" reconnectTransportOnFailure="true" timestampValidityDuration="01:00:00" cookieRenewalThresholdPercentage="60"/>
        <localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00" maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="01:00:00" negotiationTimeout="01:00:00" replayWindow="01:01:00" inactivityTimeout="01:00:00" sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="01:00:00" reconnectTransportOnFailure="true" maxPendingSessions="128" maxCachedCookies="10000" timestampValidityDuration="01:00:00"/>
        <secureConversationBootstrap/>
      </security>
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap11WSAddressing10" writeEncoding="utf-8">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
      </textMessageEncoding>
      <httpTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true">
        <extendedProtectionPolicy policyEnforcement="Never"/>
      </httpTransport>
    </binding>
  </customBinding>
</bindings>

is there any issue in the settings.Getting one exception as "The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via"

  • Possible duplicate http://stackoverflow.com/questions/2435823/the-provided-uri-scheme-https-is-invalid-expected-http-parameter-name-via?rq=1 – Dietz Jul 31 '15 at 08:02
  • no its not.i checked that and tried to add security mode="transport" shows another error "unrecognized attribute 'mode'. note that attribute names are case-sensitive".Im trying this to run using one sample windows appln –  Jul 31 '15 at 08:23

1 Answers1

0

As the service is running on HTTPS, <httpTransport> tag in the above configuration should be changed as <httpsTransport>.Do the change and try again.

Jithin j
  • 272
  • 1
  • 3
  • 13