Solved

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

Posted on 2013-11-05
4
373 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 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
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.

856 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