Hi, Every body, I have one problem that I want to get window logged in user in asp.net, each and every time it is giving ASPNET, I want only window user. I have WindowsIdentity class, HttpRequest.ServerVariables, Environment Variable class. But still giving ASPNET, Plz help me.

Thanks

Recommended Answers

All 4 Replies

Hi
TRY WITH BELOW CODE

string[] words = Context.User.Identity.Name.Split('\\');
oPayment.ModifiedBy2 = words[words.GetUpperBound(0)];

HPE IT WILL HELP YOU

I have tried, but it is giving nothing. when I try the url like-
http://localhost/vms/abc.aspx
then its giving nothing. Actually I want , when I install the site in IIS then It should trap the window user. Its working when I don't install the website in IIS. Plz help me.

Thanks

Hi
TRY WITH BELOW CODE

string[] words = Context.User.Identity.Name.Split('\\');
oPayment.ModifiedBy2 = words[words.GetUpperBound(0)];

HPE IT WILL HELP YOU

HI,
Go to IIS-->select your site-->right click-->go to properties--> click on directory security tab-->click on first edit button--> check basic authentication checkbox. Rest of the checkbox keep unchecked.

HOPE NOW USER CAN LOGIN && YOU WILL GET USER IDENTITY.

HAPPY PROGRAMMING

Hi,
Thank you very much. I did , and its working fine. First I checked the basic authentication check box and one warning message I got and finally I gave the domain name of the computer where the IIS is installed and by clicking twice the ok button and it gets set.

Thank u a lot for this post. It solved my 15 days problem.

HI,
Go to IIS-->select your site-->right click-->go to properties--> click on directory security tab-->click on first edit button--> check basic authentication checkbox. Rest of the checkbox keep unchecked.

HOPE NOW USER CAN LOGIN && YOU WILL GET USER IDENTITY.

HAPPY PROGRAMMING

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.