Hello,
I know how to create a self hosted wcf for http or https, but not at the same time.
I would like a wcf for this 2 urls :
- https:// 127.0.0.1:13070/ProxySips/
- http:// 127.0.0.1:13070/ProxySips/
At the moment I have the configuration for https (with a certificate: makecert + netsh) and it works fine:
app.config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="basicHttp" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="ProxySips_Wcf.Sips" behaviorConfiguration="ProxySips_Wcf.ProxySipsBehavior">
<host>
<baseAddresses>
<add baseAddress="https://127.0.0.1:13070/ProxySips/" />
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="basicHttp"
contract="ProxySips_Wcf.ISips"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ProxySips_Wcf.ProxySipsBehavior">
<serviceMetadata httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="True" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
Host
var serviceType = typeof(ProxySips_Wcf.Sips);
var host = new ServiceHost(serviceType);
host.Open();
Can help me set up the http version for the same address?
Many thanks