Solved

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

Posted on 2013-11-05
4
342 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
  • 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 19

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

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.

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

760 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

18 Experts available now in Live!

Get 1:1 Help Now