开发者

Switching between WCF windows authentication and basic authentication

开发者 https://www.devze.com 2023-01-27 02:06 出处:网络
I have an application where it should be possible to choose whether you want to use the built in securit开发者_StackOverflow中文版y (basic username and password) or the windows authentication. How do

I have an application where it should be possible to choose whether you want to use the built in securit开发者_StackOverflow中文版y (basic username and password) or the windows authentication. How do i make this possible for my application? different endpoints for each type?


I concur with your suggestion: the service should expose different endpoints for each authentication type, and the client will programaticaly select the appropriate endpoint.

The authentication type is a property of the Transport or Message security (depending upon which mode you are using), and the security settings are a property of the binding configuration.

So you would need to create two separate binding configurations. Then you would create two separate endpoints, each endpoint referencing a different binding configuration.

0

精彩评论

暂无评论...
验证码 换一张
取 消