简体   繁体   中英

Switching between WCF windows authentication and basic authentication

I have an application where it should be possible to choose whether you want to use the built in security (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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM