Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get WCF to use both http and https for an operation

Tags:

wcf

I have a simple pox operation using webHttpBinding and am specifying a security mode of transport to enable HTTPS. Once i do this though, I can no longer send http traffic to it. I'd like the option of both. How can I enable https while also keeping http?

like image 833
James Alexander Avatar asked Oct 14 '22 22:10

James Alexander


1 Answers

You will have to create service with two WebHttpBinding endpoints. One endpoint will use HTTP (binding without transport security) and second endpoint will use HTTPS (binding with transport security). You will also have to configure your IIS to support both HTTP and HTTPS (assign certificate).

The question is if this is reasonable? If you really think that your service has to provide secure transport because of confidental data then providing unsecured endpoint in the same time doesn't seem like a good solution.

like image 132
Ladislav Mrnka Avatar answered Oct 18 '22 01:10

Ladislav Mrnka