Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 08, 2012 06:50 PM by MKozlowski
Mar 08, 2012 12:25 PM|LINK
I am using the following code to retrieve the username:
For some reason it only works with some users? It seems to be the new users that were created recently that it is returning blank? The difference between the old users and new
users is that the new user account have 7 characters for a username where the old one is 5. Any ideas? Thanks!
Mar 08, 2012 01:03 PM|LINK
The below link might help you.
Mar 08, 2012 01:05 PM|LINK
check if this relates to u r problem
also, do this test on users machine...
for the users where it is not working, open Internete explorer
go to Tools->internet options.. in the securiyt tab, select appropriate zone at top and then click on "custom level" button...
the new dialogue will appear... in this dialogue, scroll till end and check Logon "section"
mark check option "Automatic logon with current username and password" and restart all browser windows...
now ask user to open the web page and see if REMOTE_USER value is received
hope this helps...
Mar 08, 2012 01:24 PM|LINK
Thanks for the responses, still does not work. Really confusing as to why it only is working for older users. I logged on as one of the new users using my browser and does not work, but if I do a 'run as" as an older account it works?
Mar 08, 2012 01:28 PM|LINK
strName = HttpContext.Current.User.Identity.Name.ToString()
and please refer this...and let me know
Mar 08, 2012 01:42 PM|LINK
I changed it to
HttpContext.Current.User.Identity.Name.ToString() and now all users are returning blank. I have modified the web config and tried everything suggested. Maybe its something in active directory for the new users that
is preventing this. I checked the attributes and it matches the other accounts. Very puzzling...
Mar 08, 2012 02:18 PM|LINK
hi..frd try this..
Mar 08, 2012 02:27 PM|LINK
I did everything those links suggested but same issue. Not sure ?
Mar 08, 2012 03:02 PM|LINK
did u followed my post? even when u do "Run As" and use some other credentials.... the browser settings are changed (browser settings are baed on individual user profile)
it might be that, when doing Run as, and using some other user id, due to browser setting, blank username/password is being passed
Mar 08, 2012 03:12 PM|LINK
Ya, I verified the settings were set after when I was doing the run as. What I dont understand is why would it have a blank username and password for some accounts and not others. You would think that it either it does it for all or none.