Solved

Does User.Identity.Name get its value from a cookie or from the datasource?

Posted on 2009-05-11
3
308 Views
Last Modified: 2012-05-06
I have a web page and service that is hit alot and I need to know if the user is signed in and which user is signed in.  I don't want to hit the database every single time so I was hoping I could extract this from the cookie while in c# code behind?  Can someone please elaborate or point me to some link that does?
0
Comment
Question by:joshuadavidlee
3 Comments
 
LVL 9

Accepted Solution

by:
tillgeffken earned 500 total points
ID: 24361801
User.Identity.Name does not query a database. It gets passed to the app by the authentication provider. Safe and well performant.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24364523
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Angular JS Route 3 44
Not showing JavaScript in the list 5 35
Run time Error 4 34
What do you call this line of code in this .NET Core page? 4 16
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

932 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

9 Experts available now in Live!

Get 1:1 Help Now