Wcf Basic authentication

前端 未结 4 1613
小蘑菇
小蘑菇 2021-02-18 16:28

Having some trouble using basic authentication with a simple test Wcf service. I am getting an exception:

The requested service, \'http://qld-tgower/test/

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-18 17:15

    You're not allowed to use username authentication over an unsecured connection

    You can secure the message by using a secure transport (e.g. SSL) or message encryption (using certificates)

    I have used ClearUsernameBinding in the past to great success, but I don't recommend it in production. I used it so that I could keep all my authentication code the same without requiring SSL in dev/test environments, but having it work with SSL by changing the configuration only.

    Note: that custom binding isn't perfect, and I had to change it a bit to enable certain configuration changes.

提交回复
热议问题