我的 wcf 服务遵循以下负载平衡结构:
公共(https)-> F5 LB(http)-> node1/node2。
我在 http 方案上公开服务,F5 LB 负责 ssl 卸载。由于我的服务公开为 http,因此通过 F5 LB 生成的 wsdl 包含基于 http 的 url,如下所示:
我的 LB 服务网址:
https://myservice.mydomain.com/service1.svc
生成的服务页面是:
MyService Service
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http://myservice.mydomain.com/service1.svc?wsdl
You can also access the service description as a single file:
http://myservice.mydomain.com/service1.svc?singleWsdl
如您所见,生成的页面具有从应用程序节点公开的 http url。由于 F5 LB 将服务公开为 https,因此它不允许上述 http url 并且来自客户端的请求正在弹跳。
现在,我们可以调整我的服务 web.config 以在 http 方案上公开服务,但让 wsdl 指向https url,以便从 F5 LB 上面生成的 wsdl 的 url 也可以在 https 上工作,并且客户端将在 https 上工作,并且来自 LB 的请求将到达我的服务处理的 http 服务?