Solved

User identity

Posted on 2006-11-03
5
170 Views
Last Modified: 2010-04-20
We are using VS 2005. I need to get user who have logged on to the Intranet site I am using
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
this.GblUserID = p.Identity.Name;

this returns me the results only on my development local machine. when I moved the code to staging server It won't return any results.

Can some one please help me asap. in my web.config I have
<authentication mode="Windows"/>
    <identity impersonate = "true" />
thanks
0
Comment
Question by:Anukulk
5 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 17876559
Hi,

To the best of my knowledge, "Windows" authentication mode does not mean NTLM, it means that authentication will happen at the IIS level.

check this..

NTLM
FUSION-PUNE\validusername
True
True
False

----
NTLM
FUSION-PUNE\validusername
True
True
False

The result when "Anonymous Access" set in IIS.

NTLM
FTPUNE0025\IUSR_FTPUNE0025
False
False**********
False

----
NTLM
FTPUNE0025\IUSR_FTPUNE0025
False
True****
False


R.K
0
 

Author Comment

by:Anukulk
ID: 17951731
I got this resolved I had web folder security was set anonamys access enabled. when we disabled that it is returning the windows authentication back
0
 
LVL 18

Accepted Solution

by:
Sam Panwar earned 500 total points
ID: 17984714
Hi,

Are you want to disable anonamous access disable then please go through the folowing steps in thIIS

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/524404dc-8586-46b0-89ac-0f5db6d33c9c.mspx?mfr=true
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question