This is an extraordinary coincidence: I have asked the same question. My thread is directly above yours (thread855-928083). Perhaps you could experiment with the code in my last post. I think that I'm really close to the answer.
When running an asp.net application, the app runs under the MACHINENAME\ASPNET user account. As far as I know, there is no way to get your visiting user's Windows user name (think... it would be a pretty big security risk), unless you're forcing a login using Windows authentication (and in that case, you would have to set up user accounts on your server for each new user).
You can, however, get information such as IP address, browser and browser version, etc. with the Request.ServerVaribles function (see
Well, I'm happy to get a star, but the problem persists for me!
On the same server, we have dozens of classic asp pages that use Request.ServerVariables("AUTH_USER"). They function normally. So we know that the IIS settings are okay. I set up this test:
dim x as string
x= [something]
labelx.text= x
For the text within brackets, I have tried each of these variations~
I built each of these without causing an error. Most did not return anything. The variations with one asterisk returned something other than the username. The variation with two asterisks failed when I ran it.
I am putting the code into the .aspx page's page_load event.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.