views:

157

answers:

2

On a intranet ASP .NET (C#) page I am trying to retrieve the current username.

From my local machine (Firefox 3.5) I can see results (from my local login) for the following possibilities:

<% Response.Write(User.Identity.Name); %>
<% Response.Write(HttpContext.Current.User.Identity.Name); %>
<% Response.Write(Page.User.Identity.Name); %>

However when I browse locally(IE8) or on the server (IE7) none of the above work for my terminal server login.

Is this a permission issue between IE and the webpage?

UPDATE1

Just tested the same page on the Terminal Server with Firefox portable and it also blocks the username.

+1  A: 

Hmm couple of setting you could check:

1) Internet Options > Security > (Choose your Zone) > Custom level... > User Authentication > Logon > Automatic logon with current user name and password

and/or

2) Internet Options > Advanced > Enable Integrated Windows Authentication

TimS
On my local:#1 - is already set.#2 - is already set.Can't access Internet Options on the Terminal server...sigh.Thanks though.
John M
+1  A: 

IE - forgive me for the vagueness of this answer, I haven't used it in a long time: there's a setting in IE for enabling the passing of usernames. That may be off due to Group Policies.

Thinking out loud...

Firefox would normally not work if the site used native Windows security. So, is it using text-based logon (do you actually have to log on from within Firefox?)? That would explain Firefox working.

Local browsing/server browsing: Normal browsing (internal browsing) normally doesn't bounce off a proxy server. It may be the case where the TS is configured to know this and why credentials are being passed correctly (for example, can you browse through TS using IE - does it work? Same group policy settings apply.) I've seen installations where all traffic is pushed through a proxy server, then back to internal servers. Unfortunately, this tends to strip credentials and that may be happening here, too.

What will help are the IIS logs. Do you see the failed IE traffic (403'd, I think)?

inked
No errors in the IIS logs.No login in FF. FF ability is probably due to the group policy -> I'm an administrator on my local machine and can install anything except Microsoft Updates/Programs...
John M
Thanks - it is probably a mix of a proxy/group policy that is hampering this.
John M
Check your IE settings - is there a proxy.pac file or some setting that says, "use this proxy server?" proxy.pac can be your friend for issues like this. It's one JS IF statement, but it can fix or help find problems so easily.
inked