I am trying to deploy a WCF service to IIS. I would like to offer both HTTP and HTTPS endpoints, but Im not guaranteed that the IIS servers will have HTTPS available. I开发者_运维百科f its not, then my service will fail start.
Is it it possible to test if an endpoint is viable before adding it to the service? Right now i am limited to using .NET 3.5(sp1)
If your site exposes some page with known address you can try to access it with HttpWebRequest over HTTPS but I don't think it is a good idea. Wrap your deployment into installation package and offer administrator to choose if HTTPS endpoint should be used or not. Your installation package will modify service configuration based on administrator's choice.
精彩评论