Pass Principal Object To Web Service

Discussion in 'Microsoft VB .NET' started by Mythran, Jul 1, 2005.

  1. Mythran

    Mythran Guest

    I have a custom Principal (implements System.Security.Principal.IPrincipal
    interface) that I need to access from a WebService. My web application has
    the Thread.CurrentPrincipal set to this new Principal object, as well as
    HttpContext.Current.User. But when I access either Thread.CurrentPrincipal
    or HttpContext.Current.User from the Web Service, they are not the same as
    those set in the Web Application (and I can see why). My question is, how
    can I make the Principal from the Web Service be the same as the one from
    the Web Application? If I have to pass the Principal to the Web Service,
    that is fine...but I seem to not be able to do this.

    In our security system, it has fills the roles collection and creates a new
    custom Principal instance (along with the Identity). This principal is used
    by our business logic layer to check the user's permissions/roles. The Web
    Service calls the methods on the business logic layer and all calls fail
    because the Principal object doesn't contain the correct Roles.

    So, how can I do this? I need to access the same Principal object on the
    Web Service as the one that's created on the Web Application.

    Thanks,
    Mythran
     
    Mythran, Jul 1, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jose

    web service(pass events)

    jose, Nov 12, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    176
  2. Raymond Lewallen
    Replies:
    7
    Views:
    979
    Jay B. Harlow [MVP - Outlook]
    Jul 7, 2004
  3. moondaddy
    Replies:
    1
    Views:
    489
    W.G. Ryan eMVP
    Jan 5, 2005
  4. Mythran
    Replies:
    0
    Views:
    170
    Mythran
    Jun 30, 2005
  5. James

    Imports System.Security.Principal

    James, Nov 7, 2005, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    231
    Herfried K. Wagner [MVP]
    Nov 7, 2005
Loading...

Share This Page