Solved

User identity

Posted on 2006-11-03
5
167 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

743 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

8 Experts available now in Live!

Get 1:1 Help Now