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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. jose

    web service(pass events)

    jose, Nov 12, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    232
  2. Zacknafein
    Replies:
    0
    Views:
    396
    Zacknafein
    Dec 23, 2003
  3. Raymond Lewallen
    Replies:
    7
    Views:
    1,383
    Jay B. Harlow [MVP - Outlook]
    Jul 7, 2004
  4. moondaddy
    Replies:
    1
    Views:
    559
    W.G. Ryan eMVP
    Jan 5, 2005
  5. Mythran
    Replies:
    0
    Views:
    219
    Mythran
    Jun 30, 2005
  6. James

    Imports System.Security.Principal

    James, Nov 7, 2005, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    319
    Herfried K. Wagner [MVP]
    Nov 7, 2005
  7. Guest
    Replies:
    0
    Views:
    445
    Guest
    Dec 13, 2005
  8. Pass Byte Array to web service

    , Jun 6, 2006, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    915
    Mike McIntyre
    Jun 7, 2006
Loading...