username

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bart

    username

    our users are always logged on in a windows domain. I made a webapplication,
    and i have to get the current username from the person who is logged on.
    I tried this
    Dim currentUser As String = User.Identity.N ame
    Response.Write( currentUser)
    But it returns an empty string. The strange thing is : i saw the username
    once, but when i went to another page, and returned to the page, it was
    gone...
  • Joyjit Mukherjee

    #2
    Re: username

    Hi,

    From IIS, Select the virtual directory for that app, right click ->
    Properties -> Directory Security -> Click Edit buton under the Anonymous
    access -> Uncheck the anonymous access checkbox & check the Integrated
    Windows Authentication check box. Probably that would solve your problem.

    regards
    Joyjit

    "Bart" <Bart@discussio ns.microsoft.co m> wrote in message
    news:67E8D35E-F2BF-4528-AC73-07251264E335@mi crosoft.com...[color=blue]
    > our users are always logged on in a windows domain. I made a[/color]
    webapplication,[color=blue]
    > and i have to get the current username from the person who is logged on.
    > I tried this
    > Dim currentUser As String = User.Identity.N ame
    > Response.Write( currentUser)
    > But it returns an empty string. The strange thing is : i saw the username
    > once, but when i went to another page, and returned to the page, it was
    > gone...[/color]


    Comment

    • Bart

      #3
      Re: username

      I've checked this, and it is all as you said, but still no change...

      "Joyjit Mukherjee" schreef:
      [color=blue]
      > Hi,
      >
      > From IIS, Select the virtual directory for that app, right click ->
      > Properties -> Directory Security -> Click Edit buton under the Anonymous
      > access -> Uncheck the anonymous access checkbox & check the Integrated
      > Windows Authentication check box. Probably that would solve your problem.
      >
      > regards
      > Joyjit
      >
      > "Bart" <Bart@discussio ns.microsoft.co m> wrote in message
      > news:67E8D35E-F2BF-4528-AC73-07251264E335@mi crosoft.com...[color=green]
      > > our users are always logged on in a windows domain. I made a[/color]
      > webapplication,[color=green]
      > > and i have to get the current username from the person who is logged on.
      > > I tried this
      > > Dim currentUser As String = User.Identity.N ame
      > > Response.Write( currentUser)
      > > But it returns an empty string. The strange thing is : i saw the username
      > > once, but when i went to another page, and returned to the page, it was
      > > gone...[/color]
      >
      >
      >[/color]

      Comment

      • Bart

        #4
        Re: username

        sorry, too quick. I solved it like you said. Thanks !

        "Bart" schreef:
        [color=blue]
        > I've checked this, and it is all as you said, but still no change...
        >
        > "Joyjit Mukherjee" schreef:
        >[color=green]
        > > Hi,
        > >
        > > From IIS, Select the virtual directory for that app, right click ->
        > > Properties -> Directory Security -> Click Edit buton under the Anonymous
        > > access -> Uncheck the anonymous access checkbox & check the Integrated
        > > Windows Authentication check box. Probably that would solve your problem.
        > >
        > > regards
        > > Joyjit
        > >
        > > "Bart" <Bart@discussio ns.microsoft.co m> wrote in message
        > > news:67E8D35E-F2BF-4528-AC73-07251264E335@mi crosoft.com...[color=darkred]
        > > > our users are always logged on in a windows domain. I made a[/color]
        > > webapplication,[color=darkred]
        > > > and i have to get the current username from the person who is logged on.
        > > > I tried this
        > > > Dim currentUser As String = User.Identity.N ame
        > > > Response.Write( currentUser)
        > > > But it returns an empty string. The strange thing is : i saw the username
        > > > once, but when i went to another page, and returned to the page, it was
        > > > gone...[/color]
        > >
        > >
        > >[/color][/color]

        Comment

        Working...