This is a migrated thread and some comments may be shown as answers.

Verify Session Values

3 Answers 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 23 Feb 2011, 09:16 PM
We stored values in our session in our site.

I see we can access cookies, but how can I verify session values?

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 23 Feb 2011, 10:20 PM
Hi Lee,

I'm not sure I understand your question. I know what a cookie is, but I'm not sure what a "session value" is to you. Is this some piece of data that is stored in your server? Is it stored in the URL? Is it stored in the browser somehow (in a cookie)?

I'm going to assume it is a piece of data stored by the application running on the server. There is kind of a brick wall between the framework and what is running on the web server. We can only access the DOM from the browser and the cookies for it. We cannot directly access anything contained on the server.

If you can come up with some mechanism to access this server data and present it in the browser, such as a special URL that fetches reads and returns this session data in the browser then we'll be able to access it.

Beyond that I need clarification on what/where this session value is so we can assist you with how to access and validate it.

Regards,
Cody
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Lee
Top achievements
Rank 1
answered on 24 Feb 2011, 05:47 PM
For cookies, we stored global values like location, language etc...

for User settings, like permissions, user settings..
These are stored in sessions..
http://msdn.microsoft.com/en-us/library/ms178581.aspx

example..
HttpContext.Current.Session["username"] = "myuser";

I want to be sure they are populated

I'm sure it isnt possible since its server side, but just clarifying what my post was originally asking,
If this isn't possible, I might just need to write a temporary web service inside page for verifying sessions
or something similar
0
Cody
Telerik team
answered on 02 Mar 2011, 01:20 AM
Hello Lee,

As I understand it, your session values are stored on the server itself in one form or another per http://msdn.microsoft.com/en-us/library/ms178586.aspx. A session ID number is transferred between the browser and the server and then the server looks up the session state (which gives the server code a HttpContext) from its server side storage according to this ID value.

This means our framework does not have the ability to get at this information directly. We can only get at the information that is kept in the browser.

Yes your temporary web service would probably be the best approach at getting anything that is stored server side.

Regards,
Cody
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Lee
Top achievements
Rank 1
Answers by
Cody
Telerik team
Lee
Top achievements
Rank 1
Share this question
or