?
Solved

User identity

Posted on 2006-11-03
5
Medium Priority
?
189 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
3 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses

807 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