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 :
You can do this through the use of Multiple Endpoints. With multiple endpoints you can support the same service over multiple protocols (HTTP and HTTPS in your case).
So you will need to add the following ServiceBehavior
:
Then the following Binding
:
And lastly the following Address
configuration:
UPDATE:
On your WCF Host
application, you will need to specify the new URI to listen at. You can set up your host similar to this:
var httpsAddress = new Uri("https:// 127.0.0.1:13070/ProxySips/");
var httpAddress = new Uri("http://127.0.0.1:13070/ProxySips/");
var host = new ServiceHost(typeof(ProxySips_Wcf.Sips),
new Uri[] { httpsAddress, httpAddress });
host.Open();