views:

135

answers:

1

How can i implement message security in WCF with custom attributes,

One way of doing this by UserNamePasswordValidator which accepts user name and password but in my case I have to pass 2 more attribute that is company and region to authenticate the user.

Please suggest the solution for achieving this.

+2  A: 

Stop re-inventing the wheel! This has already been done - see:

Foundations: Declarative WCF Security

Excellent article, comes with full source code for you to use and adapt (if needed).

marc_s