Joe,
Assuming you have authentication set up correctly, why not use the User
property (which returns an IPrincpal implementation) on the Page class, or
on the HttpContext class?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mvp@spam.guard.caspershouse.com
"Joe" <thejoe@community.nospam> wrote in message
news:9F8BB808-FAB1-494B-BD3E-EAC94187C947@microsoft.com...[color=blue]
> This may actually be an IIS configuration issue but any help would be
> appreciated.
> I'd like to display some content based upon who the current user is that
> is
> accessing an internal ASP.NET applciation. I am using the 2.0 framework. I
> use the following syntax to retrieve the user name:
>
> string username = Environment.UserName;
>
> I use the 'username' variable to make comparisons and show the appropriate
> content based upon the user. This works fine in a test enviornment
> (running
> IIS 5.1). When I move it over to production (IIS 6.0) this code snipet
> returns a single user called "NETWORK SERVICE" regardless of who or what
> machine attempts to access the web page.
>
> Any ideas on how I could return the appropriate user instead of "NETWORK
> SERVICE" in a production Win2k3/IIS 6.0 enviornment?
>
> Thanks for your help.[/color]