session

ASP.NET Session State Server vs. InProc Session

What is the overhead performance penalty for running Session State Server instead of InProc? Is it significant? I understand that you can restart w3wp with the state server and retain all session state - is that the only advantage over InProc? ...

Rails saving IP address with every create/update request

Hello, I'd like to do the following: define a before_filter in application.rb that extracts the user's IP address and stores it anywhere, preferably in the session. define two before filters in all my models as before_create and before_update that add the current user's IP to the object to be stored. Problem: I cannot access sess...

session-start warning

on my pages I get the following warning: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/com10002/public_html/compo/index.php:1) in /home/com10002/public_html/compo/index.php on line 1 My code says: <?php session_start(); require_once("lib/lib.inc...

Restful Authentication Issue

I'm using the popular restful authentication app/tutorial found here: http://railsforum.com/viewtopic.php?pid=74245#p74245 I have been using the app extensively and everything works great. The only issue that I'm having is that it takes anywhere from 60 seconds to several minutes for the system to process the creation of a new user. T...

How do you enable hibernate query cache on a session level only?

Good day, What if I have a query that gets called multiple times in a single thread, and I just want to cache that query (and its result) for that thread (or for that session since I'm using one session per thread), how can I do that ? Note: My 2nd level cache is turned on but it's used mostly for session.get(...). But I do not want to...

CGI:Session set session key

Hi, I am new to Perl and have been asked to incorporate a perl site into an existing Ajax site. The existing site already has session management and a cookie. What I want is to be able to set the session key (from the first login) as the session to be used by the CGI:session. that way both sessions can use the same cookie and the sam...

Open/Close NHibernate Session

Using FluentNHibernate in a web application, I've created a singleton SessionFactory class to have the ability of the following: SessionFactory.Instance //returns ISessionFactory Is it common/best practice to open/close sessions as follows? using(ISession session = SessionFactory.Instance.OpenSession()) { using(ITransaction trans...

In MFC program, how to pass data between different dialog?

In web development, when we want to pass something between different pages, we might use the Session to save the data. But in MFC, what can we use to store these things? Thanks! ...

cant find a reason for this bug

i just found a solution to one of the wierdest bug i have ever seen and i am still trying to find the reason ... i got a old CMs in Classic ASP. in the editor page theres a javascript changing an image property function removeimg(objimg){ objimg.onclick = ""; objimg.src = "/Logiciel/_Altitude_image/interface/Gestion_acces/space...

Terracotta Web Sessions - dynamically reload configuration and/or change configured webapps on the fly

Is there a way to dynamically reload the Terracotta configuration file without restarting Terracotta and losing Session replication for every web app? More Info: I'm in charge of about 30 unruly, legacy Java Web Applications. My goal is to setup our servers so that I can quickly redirect all traffic from one Tomcat instance to anothe...

Replace PHP Sessions

I have a social network type app I have been working on for at least 2 years now, I need it to scale well so I have put a lot of effort into perfecting the code of this app. I use sessions very often to cache database results for a user when a user logs into the site I cache there userID number, username, urer status/role, photo URL, on...

How to keep aliases in multiple shell sessions?

I want to set up some alias and would like to keep them so I don't have to reset them every time I have a new Terminal open. How can I do that? Would it require modifying hidden files? EDIT: I'm using Mac, I found a bashrc under /etc, is it the one? ...

Authorization and ASP.NET MVC Caching

I'm confused on ASP.NET MVC caching and authorization and in dire need of some clarification. My self-made authorization attribute inherits from AuthorizeAttribute. It's overridden AuthorizeCore() method runs every time, even if I set an [OutputCache] directive on a controller action. I got that part. Now the mind bender for me: Author...

storing objects in php session

The PHP documentation says "You can't use references in session variables as there is no feasible way to restore a reference to another variable." Does this mean I can't have things like: session_start(); $user =new User; $user->name='blah'; $_SESSION['user']=$user; I have tried to store a simple string and a User object in session, ...

Hibernate template close transaction

I have next working code: Session session = null; try { SessionFactory sessionFactory = new Configuration().configure() .buildSessionFactory(); session = sessionFactory.openSession(); String id = (String) FacesContext.getCurrentInstance() .getExternalContext().getRequestParameterMap().get( "storeId"); Transac...

Share first level cache between different sessions?

Is it possible for different NHibernate sessions to share one 1st level cache? I`ve tried to implement it using interceptors and listeners. All works fine except Session.Evict(). public class SharedCache : EmptyInterceptor, IFlushEntityEventListener, ILoadEventListener, IEvictEventListener, ISharedCache { [Thread...

In Process session state mode is only mode that supports Session_OnEnd event

I read two MSDN articles on Session state modes in ASP .Net. 1 and 2. Both articles shows that 'In Process' session state mode is the only mode that supports the Session_OnEnd event. If the session state Mode is StateServer or SQLServer, then the Session_OnEnd event in the Global.asax file is ignored. If the session state Mode is set t...

"Session is Closed!" - NHibernate

This is in a web application environment: An initial request is able to successfully complete, however any additional requests return a "Session is Closed" response from the NHibernate framework. I'm using a HttpModule approach with the following code: public class MyHttpModule : IHttpModule { public void Init(HttpApplication conte...

Static Session Class and Multiple Users

I am building a class to store User ID and User Role in a session. I'm not sure how this class will behave when multiple users are on the site at the same time. Does anyone see a problem with this? public static class SessionHandler { //*** Session String Values *********************** private static string _user...

SQLServer vs StateServer for ASP.NET Session State Performance

I'm studying for a MS certification and one of the practice tests I'm doing has a question where the point of contention is the performance between storing the session in SQL Server as opposed to StateServer. Given the app is running in a web farm, which solution for session state gives the best performance (SQL Server or StateServer) a...