Re: How to get Windows logon user credential?

Discussion in 'ASP .Net' started by Ken Dopierala Jr., Aug 28, 2003.

  1. Hi,
    I don't know if this will work in your case but here is what I use:
    Page.User.Identity.Name()
    Page.User.IsInRole(strRole)
    Good luck. Ken.

    "cindy liu" <> wrote in message
    news:031601c36dac$5bc31560$...
    > Hi,
    >
    > I want to get the current logon user credential. How do I
    > do it? CredentialCache.DefaultCredentials doesn't work for
    > me, because my application is ASP.Net client using Network
    > Service identity. Is there other way to get current logon
    > user credential?
    >
    > Thanks in advance!!!
    > Cindy
     
    Ken Dopierala Jr., Aug 28, 2003
    #1
    1. Advertising

  2. Ken Dopierala Jr.

    cindy liu Guest

    I tried Page.User.Identity.Name() and got the correct
    domain name and username. Why do you want to call
    Page.User.IsInRole(strRole)? Where do I define a role?
    After IsInRole returns true, what do you do next?

    Thanks,
    Cindy

    >-----Original Message-----
    >Hi,
    > I don't know if this will work in your case but here

    is what I use:
    >Page.User.Identity.Name()
    >Page.User.IsInRole(strRole)
    > Good luck. Ken.
    >
    >"cindy liu" <> wrote in message
    >news:031601c36dac$5bc31560$...
    >> Hi,
    >>
    >> I want to get the current logon user credential. How do

    I
    >> do it? CredentialCache.DefaultCredentials doesn't work

    for
    >> me, because my application is ASP.Net client using

    Network
    >> Service identity. Is there other way to get current

    logon
    >> user credential?
    >>
    >> Thanks in advance!!!
    >> Cindy

    >
    >
    >.
    >
     
    cindy liu, Aug 28, 2003
    #2
    1. Advertising

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. - Steve -
    Replies:
    3
    Views:
    2,377
    Bruno Sirianni
    Apr 2, 2004
  2. Replies:
    2
    Views:
    334
  3. culeno
    Replies:
    3
    Views:
    158
    Joe Kaplan \(MVP - ADSI\)
    May 19, 2005
  4. Kjell Kristiansson
    Replies:
    0
    Views:
    315
    Kjell Kristiansson
    Nov 30, 2005
  5. Lambuz

    DCOM + IIS + user credential

    Lambuz, Dec 16, 2005, in forum: ASP General
    Replies:
    0
    Views:
    119
    Lambuz
    Dec 16, 2005
Loading...

Share This Page