session-state

Yii Framework Session Not Saved After Login

风格不统一 提交于 2019-12-13 06:07:39
问题 We have the following function in /rpotected/components/UserIdentity.php: public function authenticate() { $username = $this->username; $password = $this->password; $user = Users::model()->find('username=? AND password=?', array($username, $password)); if($user === NULL){ $this->errorCode=self::ERROR_UNKNOWN_IDENTITY; }else{ $this->username = $user->username; sess('SESS_USER_INFO', $user->attributes); //print_r(sess('SESS_USER_INFO')); $this->errorCode=self::ERROR_NONE; } return !$this-

Session Variables Expiring

笑着哭i 提交于 2019-12-13 02:49:36
问题 I have a shopping cart app using a temporary MySQL table to store cart contents. Each row of the cart table has the session value saved to uniquely identify that row. I'm setting the initial value using the following: $session_id = session_id(); Each time a user adds an item to their cart, I run a query to count the number of products in their cart and save that value using the following: $_SESSION["total_cart_products"] = $cart_total_products['total_cart_products']; On the web site, the cart

Sharepoint Master Pages and Session State

南笙酒味 提交于 2019-12-12 22:32:31
问题 I’m using Heather Solomon’s minimal publishing master page, I’ve got a simple feature with an apsx page and a code behind file that does this public class SSInformPage : Page { protected Literal Literal1; protected override void OnLoad(EventArgs e) { //base.OnLoad(e); try { HttpContext.Current.Session["Name"] = "Mr Ben"; Literal1.Text = string.Format("{0} {1}", HttpContext.Current.Session["Name"].ToString(), Session.SessionID); } catch (Exception ex) { Literal1.Text = string.Format(ex.Message

How to set the ASP.NET SessionState read-write LOCK time-out?

谁都会走 提交于 2019-12-12 12:14:44
问题 I have a WCF web service that uses ASP.NET session state. WCF sets a read-write lock on the session for every request. What this means is that my web service can only process one request at a time per user, which hurts perceived performance of our AJAX application. So I'm trying to find a way to get around this limitation. Using a read-only lock (which then allows concurrent access to the session) isn't supported by WCF. I haven't found a way to release the read-write lock manually during

Is storing data in PHP $_SESSION insecure?

China☆狼群 提交于 2019-12-12 08:48:58
问题 As per my understanding, PHP processes doesn't behave as application server process. So, after the execution of a script the PHP process retains no user specific data. It instead stores them in the user's cookie. So whatever we store in $_SESSSION goes into cookies. Is this true? If yes then are they stored in clear text or some encoding or encryption is done? 回答1: No, the only thing that goes into the session cookie is the ID of the session - a random alphanumeric string. All the session

Is it possible to have a compile time check that a type is marked with the Serializable attribute

跟風遠走 提交于 2019-12-12 07:24:50
问题 Specifically we're making our application compatible with the Out Of Process Session State server where all types saved in session must be serializable. Is there a way to see at compile time that any type put into HttpSessionState is marked with the Serializable attribute. Something along the lines of this 'non-valid' code public static void Put<T>( string key, T value ) where T : IsMarkedWitheSerializableAttribute { HttpContext.Current.Session[key] = value; } 回答1: You could write a custom

Session State and Application Pool

谁说胖子不能爱 提交于 2019-12-12 06:28:09
问题 I have a webserver, and my team have set the application pool for the web application to 3 for resilence and performance. However, we have stumbled upon a problem where part of the application is not fully working. We believe the problem lies where this part of the application uses sessions, and we think that when the data is posted back it doesn't link back to the correct worker process. However, I am not sure about this, or whether I should be using SessionState in the web.config. If I am

How does the MemCacheStore really work with multiple servers?

扶醉桌前 提交于 2019-12-12 05:18:17
问题 I can't find documentation on the behavior of ActiveSupport::Cache::MemCacheStore anywhere, and I'm hoping someone here can shed some light. The rdoc says: " Clustering and load balancing. One can specify multiple memcached servers, and MemCacheStore will load balance between all available servers. If a server goes down, then MemCacheStore will ignore it until it comes back up. " Ok. I want the last feature, so if a memcache server goes down the whole stack doesn't fail. But I need to

CODI ViewAccessScoped session behavior

强颜欢笑 提交于 2019-12-12 04:58:15
问题 I have a prototype small application built using JSF 2.0 with Primefaces 3.4.2., Spring 3 and Hibernate 4 For ManagedBeans I am using scope as @ViewAccessScoped . I have noticed that while doing pagination in datatables and selection of rows, same view session is used for all sessions, i.e. if I select 3rd row in datatable using Chrome and if I open another browser session using Firefox or Internet Explorer, I can see the same session with 3rd row being selected of datatable. What could be

Transfer Session Variables

妖精的绣舞 提交于 2019-12-12 03:13:26
问题 I am trying to pass a vbscript session variable to my c# page. Upon research I found this page: Transfer Session Variables from Classic ASP to ASP.NET I don't know how to change my Int32 intresortID = Convert.ToInt32(Request.QueryString["TypeID"]); to read in the session variable in the same manner as from the code provided in the link above(pasted below:) <TITLE>ASPNETPage1.aspx</TITLE> <%@ Page language="c#" %> <script runat=server> // We iterate through the Form collection and assign the