session

How to redirect javax.mail.Session setDebugOut to log4j logger?

How to redirect javax.mail.Session setDebugOut to log4j logger? Is it possible to redirect only mailSession debug out to logger? I mean, there are solutions like link text which reassigns all standard output to go to log4j --System.setOut(new Log4jStream()) Best Regards ...

NHibernate Session DI from StructureMap in components

I know this is somewhat of a dead horse, but I'm not finding a satisfactory answer. First let me say, I am NOT dealing with a web app, otherwise managing NH Session is quite simple. I have a bunch of enterprise components. Those components have their own service layer that will act on multiple repositories. For example: Claim Compo...

Manage database connection using connection pool or session. How?

I have a simple task to accomplish, but I am not sure what is the best way to go by. Each user has their own username and password to connect to a database with different privilege. Once the user connect, he will do multiple query base on what action he want to perform. Therefore I want to retain the connection with the database. So h...

DotNetNuke: load data in session at login time

I'm using DNN 5. When a user logs in, I want to load some data into the session. Where should I add my code? Should I intervene into the login.aspx's code behind? ...

Why am I getting this PHP session_start() error?

I can not figure out why I am getting this session error... Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\webserver\htdocs\project2\labs\form-submits\index.php:2) in C:\webserver\htdocs\project2\labs\form-submits\index.php on line 2 ...

PHP Session Cookies stopped working on my server ONLY

I have a bizarre issue going on with my dev server. Just a few hours ago PHP session just totally quit working. Every single file (hundreds) started showing errors like below, about session cookies not being written. I cannot figure out what the problem is, what cause this to just start happening, before everything worked and I haven'...

PHP - Does session_unset unregister $_SESSION vars?

Does session_unset() unregister all the $_SESSION vars, or do you have to manually clear each variable registered into the $_SESSION array with unset() ? I'm confused about this because the PHP documentation says: Only use session_unset() for older deprecated code that does not use $_SESSION. If $_SESSION is used, use unset() ...

Is it possible to use .ASPXAUTH for my own logging system?

For a web application I switched from using ASP.NET Membership to using my own log in system which just does something like this to mark a user as logged in: Session["UserId"] = User.Id Is it possible to store the user id in the ASPXAUTH cookie, piggybacking on its encryption, instead of using the standard session? The goal is for th...

Can't pass mysqli connection in session in php

I'm trying to pass a session with mysqli connection for multiple queries on the site, but when I try to do a query it outputs a warning "Couldn't fetch mysqli" $_SESSION['db']=new mysqli($host,$username,$password,$db); Is it impossible to pass a mysqli connection reference thru session? is there a different method to use? ...

delete session files after a time from creation

hello, I am saving my sessions in another directory from /temp directory. say /session directory.( using session_save_path("session") ) also, there is a code to kill the session after 10 minuets from creation and logout. but I mentioned that if the user logs in and for example shut down his computer, my log out and session destroy cod...

best practices in naming session variables

I was used to naming my session variables the "normal" way, kinda like when I want to keep track of user details, I name them: $_SESSION['username'] $_SESSION['email'] $_SESSION['id'] I am worried that they may be in conflict with other session data when I am browsing sites in the same browser, or will there not be any conflict at a...

Client side sessions

I want the clients of several related web apps to hold their own authentication state. This improves scalability, because no session replication between cluster nodes is needed. And it makes integration of different server technologies like Java Servlets and PHP easier. My plan is as follows: Set a signed and encrypted cookie with th...

How to store temporary data from one request to the other in MVC

In some requests, external data has to be fetched from Soap service. Obviously I don't want to get that data at each call for the same user. What is the best practice to store temporary data from one request to the other? The data could take up to 10 meg. ...

Create an interactive logon session

I'm trying to create a utility similar to Microsoft's abandoned Super Fast User Switcher (download), which allows fast user switching without going through the Welcome screen. I have a working implementation using the undocumented WinStationConnectW API (along with WTSEnumerateSessions), but it can only switch to a user who is already l...

ASP.NET:,Will session variables exist when Application_Error method being called from global.asax ?

In ASP.NET ,Will session variables exist when Application_Error method being called from global.asax ?Can i access values of my session variables there ? ...

Session is lost and created as new in every servlet request

I have this big issue. My current session is gone every time I made a new request to Server. I have checked in a lot of places. I can't find what's the problem. I also have included session-config in web.xml both in tomcat and application. I also enabled to accept cookies to my browsers. Tested in every browser. It's not working. I am...

function.session-start is displaying on sign-in-action page with other correct links why so and how to check session for sign-in-action-form

<?php session_start(); if(isset($_POST['username']) && ($_POST['password'])) { $con=mysql_connect("localhost","root",""); if(!$con) { die('Could Not Connect:'.mysql_error()); } mysql_select_db("tcs",$con); $usr=$_POST["...

Why do most PHP frameworks use set/get for Session variables?

I am very curious as to why all the main PHP frameworks like zend use setter and getter methods to set and get basic $_SESSION['user'] variables? I am doing it myself right now but I really don't know why I am, other then the fact that I see it being done fairly often by others now. So in theory at least, it seems like wrapping these i...

Are .Net property setters ever called implicitly?

I'm on an ASP.Net 2.0 project, in C#. I have some data that gets stored in session state. For ease of use, it is wrapped in a property, like this: protected IList<Stuff> RelevantSessionData { get { return (IList<Stuff>) Session["relevant_key"]; } set { Session["relevant_key"] = value; } } Gettin...

Maintaining state in the application server or in the database?

REST advocates web applications without client state on the server. The famous shopping cart example is translated to a resource which typically resides in a database. I wonder if it is a good practise to use a database for that kind of data, since the database is already the bottleneck in many applications. Wouldn't it be better to use...