Solved

User identity

Posted on 2006-11-03
5
169 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now