“A registration already exists for URI” when hosting same service for HTTPS and HTTP

后端 未结 2 1683
北海茫月
北海茫月 2021-02-09 07:58

I am trying to host the same service inside the same website using two endpoints one HTTP and the other HTTPS.

The problem is I can happily call one service (wh

2条回答
  •  别那么骄傲
    2021-02-09 08:23

    It's possible the nested directories are confusing IIS - I have had this happen before although not in the WCF context. Try changing the endpoint addresses to:

    address="http://localhost/MyService"
    address="https://localhost/MySslService"
    

    Can you try hosting the application from a console app instead of IIS? I'm pretty certain IIS is causing your problem somehow but this might confirm it.

    If it's possible, I'd also try to isolate the problem by removing some of the configuration detail - eg bindingConfiguration and behaviorConfiguration.

    Obviously these are just debugging steps I'd perform (you may have already) to try and isolate the problem - sorry I haven't got a full answer.

提交回复
热议问题