>>Solved: 900 System.ArgumentException: The provided URI scheme ‘http’ is invalid; expected ‘https’.
Solved: 900 System.ArgumentException: The provided URI scheme ‘http’ is invalid; expected ‘https’. 2018-02-28T15:05:50+00:00

Home Forums WebServices WCF Asmx WebApi Solved: 900 System.ArgumentException: The provided URI scheme ‘http’ is invalid; expected ‘https’.

  • Author
    Posts
  • Muhammad Zaheer
    Keymaster
    Post count: 10

    ResponseMessage : 900System.ArgumentException: The provided URI scheme ‘http’ is invalid; expected ‘https’.

    900System.ArgumentException: The provided URI scheme ‘http’ is invalid; expected ‘https’.

    Parameter name: via

    at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)

    at System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)

    at System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)

    at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)

    at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)

    at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)

    at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)

     

    Solution :  1)

    Make sure you are using https binding

    <endpoint address=”” binding=”basicHttpsBinding” contract=”SCTH_MofaService.ISCTHService”/>

    2)  Https get should be enabled.

    <serviceBehaviors>
    <behavior>
    <!– To avoid disclosing metadata information, set the values below to false before deployment –>
    <serviceMetadata  httpsGetEnabled=”true”/>
    <!– To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information –>
    ….
    </behavior>
    </serviceBehaviors>

    3)  Bindingconfiguration should have secruity mode =Transport

    <bindings>
    <basicHttpsBinding>
    <binding name=”BasicHttpsBinding_Service
    <security mode=”Transport”>
    <transport clientCredentialType=”None” />
    </security>
    </binding>
    </basicHttpsBinding>
    </bindings>

    <endpoint address=”” binding=”basicHttpsBinding” bindingConfiguration=”BasicHttpsBinding_Service” contract=”IIMCIService”>

     

     

You must be logged in to reply to this topic.