We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

why is this string empty?

Last post 03-28-2008 4:22 PM by pete.sykes. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-25-2008 6:27 PM

    • Complete
    • Top 500 Contributor
    • Joined on 12-26-2005
    • Member
    • Points 370

    why is this string empty?

    when I run my C# code in debug mode, "this.User.Identity.Name;" or "Page.User.Identity.Name;" as a web UI object, contains my alias name, and yet when I run the program from my computer in real time, the string is empty.  Why?

    • Post Points: 10
  • 03-28-2008 4:22 PM In reply to

    • pete.sykes
    • Not Ranked
    • Joined on 09-11-2007
    • United Kingdom
    • New Member
    • Points 5

    Re: why is this string empty?

    I assume that your application doesn't use any logon or authentication - which is the default for web applications in VS.

    When you're debugging you're using the web server built into VS itself (unless you've configured it to use IIS) - because VS runs within the context of your own ID it shows your details.  When the web site is running from IIS it will be running with anonymous access enabled so there will be no user context set for it, hence the blank string.

    Pete

    • Post Points: 5
Page 1 of 1 (2 items)