session

Agile Web Development with Rails Chap8:Sessions

I have completed chapter 7 successfully so far but now am stucked at Chapter 8: Sessions I m using rails version 2.3.2 I am following the instructions and code as written in the book but It is showing me the error of Token Authentiction Failed when i refresh store.rb to see the cart. how can i resolve this problem? i want to know from...

What's the problem with Sessions in ASP .Net

I keep hearing that it's bad practise to store large object collections / anything in the session. Often during conversation it's quickly followed by: 'Just turn sessions off' So what is the general problem with sessions? I use them a fair bit and since they 'real' session is stored behind a strongly typed container I don't really see t...

How do you access the session from within an ActionMailer class?

I have is an application can be accessed from 2 different URLs and looks/behaves slightly different depending on which URL you use to access it. I'm able to do this by storing a value in the session object and basing some decisions off of it such as which path views get loaded from. This sort of approach seemed like it would work until ...

SSL with multiple domains and one application in JBoss Seam

Hi, I have 2 domains name, say, www.domain1.com and www.domain2.com. I would like setup pages.xml so that make a redirect from first domain to second domain, through a web link, and change scheme from http:// to https:// at the same time, without losing session context. Is this possible? How can I do it? Thanks you very much. David ...

How can I prevent the Facebook session key from expiring

I am developing a Facebook app in Zend Framework. I am using the Facebook session key for my PHP session ID (this is the practice recommended by Facebook). The problem is that after an hour or so, it appears that the Facebook session key expires because I lose my PHP session. Is there a way to prevent (or at least significantly delay) th...

List all active ASP.NET Sessions

How can I list (and iterate through) all current ASP.NET sessions? ...

Get ASP.NET Session Last Access Time (or Time-to-Timeout)

I'm trying to determine how much time is left in a given ASP.NET session until it times out. If there is no readily available time-to-timeout value, I could also calculate it from its last access time (but I didn't find this either). Any idea how to do this? ...

What is the difference between Session.Abandon() and Session.Clear()

hi all. I searched for this question but don't grasp total answer. Some answers are: "Session.Abandon() destroys the session "Session.Clear() just removes all values i don't understand this. What is the difference between destroying a session and removing its values (please with a example show me this). A friend told me this: ...

Handling Multiple databases with NHibernate in a single application

At the moment I define the connection properties in a configuration file and only ever connect to one database. I'd like to be able to at some point have a user login, figure out (via a seperate central database maybe) what database they should be connected and from that point on all sessions created will talk to that database. Whats th...

Forms Authentication Timeout vs Session Timeout

Hi, In my asp.net website i am using asp.net form authentication with following configuration <authentication mode="Forms"> <forms loginUrl="~/Pages/Common/Login.aspx" defaultUrl="~/Pages/index.aspx" protection="All" timeout="30" name="MyAuthCookie" path="/" requireSSL="false" cookieless="UseDeviceProfile" enableCrossAppRedirects=...

NHibernate using single configuration file to connect to multiple dbs

I'd like to have a single configuration file and then when I'm creating a session change the hibernate-configuration->session-factory->connection.connection_string property to what I want it to be programmatically? Is it possible? UPDATE: I believe I may be able to do this like this Configuration cfg = new Configuration(); cfg.Configu...

ASP.NET 2.0 Session & Master Page

In my MasterPage I am setting a session variable to some value, that I got from the database. The value is shown on the footer of every page, that's why it is in the MasterPage. protected void Page_Load(object sender, EventArgs e) { Session["TODAY"] = value_from_DB; } Later on, I want to use this value on other pages, but ...

Load balancing: DNS round robin in front of hardware load balancers. How to share stickiness?

Hi, DNS Round Robin (DRR) permits to do cheap load balancing (distribution is a better term). It has the pro of permitting infinite horizontal scaling. The con is that if one of the web servers goes down, some clients continue to use the broken IP for minutes (min TTL 300s) or more, even if the DNS implements fail-over. An Hardware Loa...

What is the Python equivalent of application & session scope variables?

Recently started on python, wondered what the equivalent object was for storing session & application scope data? I'm using Google App Engine too so if it has any extra features (can't seem to find any immediate references myself) that would be useful ...

Inline sessions what are they?

I just got back from a talk. I overheard the term "inline sessions" which should be an alternative to cookie sessions. Do you guys know what that is and if it can be implemented in PHP? ...

(ASP.NET) How would I determine the length of time a user has been on the site?

I need to display an alert to a user, if they have been on my site for five minutes and have not logged in. How do I do that? Would I add soemthing to session on Application_Start? Is there a way to just check the length of someone's session? Perhaps put something in the header/master page and if it exceeds five minutes throw up th...

Prevent Ruby on Rails from sending the session header

How do I prevent Rails from always sending the session header (Set-Cookie). This is a security problem if the application also sends the Cache-Control: public header. My application touches (but does not modify) the session hash in some/most actions. These pages display no private content so I want them to be cacheable - but Rails alway...

Share session data between sites?

Hi, i'm working on multisite and I'd like to share session data between two or more sites. I have session id, but what is the best way to retrieve session data from cookie store? Or it will be better to enable ActiveRecord session store and use find_by_session_id method to retrieve session data? Using this way - I need to configure one s...

authlogic shared session

Hi, all. I have shared between 2 sites ActiveRecord Session Store. On the first i've created UserSession object. Is there any way to restore UserSession on the second if i know session_id? ...

Zend Framework Application Session Resource and Bootstrapping, what is wrong?

Hi: I am using the latest version of Zend Framework (1.9.3PL1). I set the following in my .ini ; Bootstrap session resources resources.session.save_path = APPLICATION_PATH "/../data/sessions" resources.session.use_only_cookies = true resources.session.remember_me_seconds = 864000 Next I want to initialize my session in my bootstrapper...