Solved

What is the best way(Session/cookies) save login credentials like login name, role etc.?

Posted on 2013-11-05
4
380 Views
Last Modified: 2013-11-11
What is the best way(Session/cookies) save login credentials like login name, role etc.?
0
Comment
Question by:Raj_donet
[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
  • 2
4 Comments
 
LVL 5

Expert Comment

by:ckluka
ID: 39624357
You'll have to be more specific. Do you mean save credentials for the user so they don't have to enter them again? or save a session token so the user is identifyable across login sessions? or...

Give me some kind of user story to go along with this. Your question is way too vague.
0
 

Author Comment

by:Raj_donet
ID: 39624592
When user login into the website, I want to save the username in a session, so that I can user the sessions object as pass check the credentials, later when get the role and save in session and retain the username and object through multiple pages. I usually use Session to do this. but I want to know if there is any specific advantage of using cookie over session. Which one is more secure?
0
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 500 total points
ID: 39625604
Session is more secure. It's created on the server and the user can never see it. Cookies are created at the client and viewable unless encrypted.

http://forums.asp.net/t/1849080.aspx

http://www.codeproject.com/Questions/410609/in-session-and-cookies-which-is-more-secure
0
 

Author Closing Comment

by:Raj_donet
ID: 39639417
Thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

691 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