Link to home
Start Free TrialLog in
Avatar of SiraX
SiraXFlag for Luxembourg

asked on

Get username of page visitor with c# (aspx)

Is there a possibility to get the username of a page visitor using C# (ASPX)?

We have an Active Directory server and we want to identify the users immediatly on our intranet page (so that they don't have to indicate the username when the have to make a login on restricted areas).
ASKER CERTIFIED SOLUTION
Avatar of anilmane
anilmane

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SiraX

ASKER

sorry but nothing of all that works ...

anilmane for 1> it returns nothing, 2 and 3 is almost the same but returns the user which is running the script on the IIS (IUSR_<Machinename>) and 3> returns nothing as well. (I also added the identity tag to web.config ... auth. mode was already set to "Windows".)

waterhidden, the server variable returns nothing as well :(


I know that in PHP the server variable REMOTE_USER worked but here it seems that it doesn't work. Could it be a configuration problem in IIS oder web.config?
Avatar of SiraX

ASKER

it works now ... I had to remove the anonymous access on the virtual directory/website.

thnx
Avatar of anilmane
anilmane

It was my pleasure to help you out.Thats why we are here...