Necuno
Court Jester
- Joined
- Sep 27, 2005
- Messages
- 58,567
not really sure what to call this problem but what happens is that i want to know what nt account is accessing the page.
basically i use these 3 methods to test
1
2
3
4
on box A with iis6
1) PRETORIA\jannie
2) PRETORIA\jannie
3) jannie
4) PRETORIA\jannie
on box B with iis6 or Box C with iis7.5
1) NT AUTHORITY\NETWORK SERVICE
2) PRETORIA\jannie
3) NETWORK SERVICE
4) PRETORIA\jannie
for the life of my i can't figure out why this is happening on B and C. its exact same webpage with exact same web.config.
all three are in .net 2 pool, with exactly same identity as network service.
all three's iis services also exactly the same long as.
all three are Integrated Windows authentication with basic authentication and no anonymous access allowed.
as far as i can tell box A has no impersonation setup at all, question is just why do A do what A do

basically i use these 3 methods to test
1
Code:
SecurityIdentifier user = System.Security.Principal.WindowsIdentity.GetCurrent().User;
IdentityReference userName = user.Translate(typeof(System.Security.Principal.NTAccount));
2
Code:
HttpContext.Current.User.Identity.Name;
3
Code:
System.Environment.UserName
4
Code:
Page.User.Identity.Name
on box A with iis6
1) PRETORIA\jannie
2) PRETORIA\jannie
3) jannie
4) PRETORIA\jannie
on box B with iis6 or Box C with iis7.5
1) NT AUTHORITY\NETWORK SERVICE
2) PRETORIA\jannie
3) NETWORK SERVICE
4) PRETORIA\jannie
for the life of my i can't figure out why this is happening on B and C. its exact same webpage with exact same web.config.
all three are in .net 2 pool, with exactly same identity as network service.
all three's iis services also exactly the same long as.
all three are Integrated Windows authentication with basic authentication and no anonymous access allowed.
as far as i can tell box A has no impersonation setup at all, question is just why do A do what A do
Last edited: