Re: How to add Page.User.Identity.Name into a class file?

Discussion in 'ASP .Net' started by Gregory A. Beamer, Oct 6, 2009.

  1. "Mark Rae [MVP]" <> wrote in news:OLyCPYpRKHA.1268
    @TK2MSFTNGP04.phx.gbl:

    > HttpContext.Current.User.Identity.Name


    The only potential issue I see here is you end up tightly coupling the
    library to web applications only. This may not be a big issue, but my
    preference is to pull identity and feed to the library to avoid the
    coupling.

    Peace and Grace,

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
    Gregory A. Beamer, Oct 6, 2009
    #1
    1. Advertising

  2. "Mark Rae [MVP]" <> wrote in news:eJF#JQuRKHA.5108
    @TK2MSFTNGP02.phx.gbl:

    > True, if the class needs to be reusable across project types...


    I tend to assume this direction first and then adjust based on other
    factors. I have yet to come up with a case where I felt tightly coupling to
    the UI was the proper decision. i am not saying that someone cannot come up
    with a case, however, as I have not worked through all types of problems.

    Peace and Grace,

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Twitter: @gbworld
    Blog: http://gregorybeamer.spaces.live.com

    *******************************************
    | Think outside the box! |
    *******************************************
    Gregory A. Beamer, Oct 8, 2009
    #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. Giovanni Bassi
    Replies:
    0
    Views:
    620
    Giovanni Bassi
    Oct 20, 2003
  2. nalbayo
    Replies:
    2
    Views:
    5,464
    Bruce Barker
    Nov 11, 2005
  3. Gregory A. Beamer
    Replies:
    0
    Views:
    1,519
    Gregory A. Beamer
    Oct 6, 2009
  4. Shary
    Replies:
    3
    Views:
    415
    Nicole Calinoiu
    Dec 14, 2004
  5. Antonio O''Neal

    user.identity.name returns old AD user name

    Antonio O''Neal, Oct 31, 2008, in forum: ASP .Net Security
    Replies:
    5
    Views:
    2,024
    Antonio O''Neal
    Nov 3, 2008
Loading...

Share This Page