Re: User identity



the identity is the one the browser sends. you can config the browser to ask before sending id, or use a runas to have the browser default to the desired account.

-- bruce (sqlwork.com)

gsauns wrote:
I have an ASP.NET intranet site running off one of our servers.
The app, in the Session_Start event, logs a user's currently logged-in
Windows username to a session variable.

In the dev. environment, it's no problem - it gets a proper username.
However, when I go to the URL for the site, it actually pulls a
different username (I have one normal Active Directory account, and
one Domain Admin account). It sees me as my 'username_admin' account,
even though I am logged in as 'username'... I AM Remote Desktop-ed in
to a few other servers, and I thought this was the problem, but even
upon a reboot, and going to the site is the first thing I do, it still
pulls that username.
For several other people, it pulls the correct username.

On the server, in IIS for the site, i disabled anonymous access, and
checked off Integrated Windows authentication.
Here is the apporpriate code in my web.config file:
<authentication mode="Windows"/>
<authorization>
<allow users="*"/>
<deny users="?" />
</authorization>

Does anyone know the reason, and what I can do to change that so it
pulls my currently logged in username?
Here is the variable assignment code:

System.Security.Principal.IPrincipal ip;
ip = System.Web.HttpContext.Current.User;

Session.Add("Username", ip.Identity.Name);

.



Relevant Pages

  • Re: User identity
    ... desired account. ... The app, in the Session_Start event, logs a user's currently logged-in ... Windows username to a session variable. ... pulls that username. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: cannot log on to user account following password change
    ... cannot log on to user account following password change ... I changed the username on the account in ... | on the sbs box. ...
    (microsoft.public.windows.server.sbs)
  • Re: logon failure
    ... MSSQLServer service after you change the username of administrator account. ... username for the SQL Server startup service account or the SQL Server Agent ... Microsoft SQL Server service account on the SQL Server host computer. ...
    (microsoft.public.windows.server.sbs)
  • RE: cannot log on to user account following password change
    ... home box with an existing local profile in conjunction with the sbs account. ... a local profile on the xp home box called Fiona Bavester had a username ...
    (microsoft.public.windows.server.sbs)
  • DirectoryServices error: Authentication mechanism is unknown: Solution
    ... passing username and password credentials, ... if you are running under a system account ... rather than an account that belongs to the domain you're connecting to. ... packet sniffing I was doing trying to find what happens when you bind. ...
    (microsoft.public.dotnet.general)