Results 1 to 4 of 4

Thread: [RESOLVED] Custom WCF Authentication?

  1. #1

    Thread Starter
    Lively Member xera's Avatar
    Join Date
    Nov 2006
    Location
    SA
    Posts
    104

    Resolved [RESOLVED] Custom WCF Authentication?

    Hi, I am trying to implement custom authentication in my WCF service.. Maybe I'm missing something, but I can't seem to figure out how everything goes together.

    I am using netTcpBinding, and Callbacks, so AFAIK I only have to login once per reliable session..

    For authentication, I am using UserNamePasswordValidator, to validate the username and password, which works fine, BUT, how can I find out which user logged in from my Service class (the one that implements the interface with the ServiceContract Attribute), when I call methods in that class ???
    Did you know... ..that you live in a Universe?!
    Code:
    var Answer = Uni + Verse = single + spoken + sentence;


    Life is amusing...

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Custom WCF Authentication?

    This link might help
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Lively Member xera's Avatar
    Join Date
    Nov 2006
    Location
    SA
    Posts
    104

    Re: Custom WCF Authentication?

    Thanks! That article was quite complicated, but
    Code:
    ServiceSecurityContext.Current.PrimaryIdentity.Name
    helped to get the username.
    Did you know... ..that you live in a Universe?!
    Code:
    var Answer = Uni + Verse = single + spoken + sentence;


    Life is amusing...

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Custom WCF Authentication?

    If my post was useful please rate it. If the problem is solved, mark this tread as resolved.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width