none
wcf : How I can functions authorization? RRS feed

  • Question

  • service in functions, Do not display for everyone

    my English is not good
      please give me example project or video 

    I useing C#
    thank you

     


    • Edited by ANATOLIUM Friday, June 15, 2012 1:30 PM
    Friday, June 15, 2012 1:27 PM

Answers

  • Based on my understanding, you could define a common method which mainly used to authenticate caller credential, you need to call this common authencation method before call WCF operation, for example, pass userId and Role to this method, and query the role from database based on the userId information, if the role retrieve from database matches the passed role, then it illustrate that has permission, else this user does not have permission for this WCF operation.

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Wednesday, June 20, 2012 8:24 AM
    Moderator

All replies

  • You can try the suggestions found here:
    http://msdn.microsoft.com/en-us/library/ms731200.aspx

    Friday, June 15, 2012 5:09 PM
  • hello 

    An example of this correct? because They are not  local user,they are users that are members

    are you can give me sample code ?

    Thank you for helping




    • Edited by ANATOLIUM Saturday, June 16, 2012 3:56 PM
    Saturday, June 16, 2012 3:43 PM
  • Based on my understanding, you could define a common method which mainly used to authenticate caller credential, you need to call this common authencation method before call WCF operation, for example, pass userId and Role to this method, and query the role from database based on the userId information, if the role retrieve from database matches the passed role, then it illustrate that has permission, else this user does not have permission for this WCF operation.

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Wednesday, June 20, 2012 8:24 AM
    Moderator