?
Solved

User identity

Posted on 2006-11-03
5
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

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…
What You Need to Know when Searching for a Webhost Provider
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

777 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