session-state

Using Cookies for Web Session State - What are the pitfalls?

江枫思渺然 提交于 2020-01-22 12:39:44
问题 Using in-process session state is evil when it comes to scaling web applications (does not play well with clusters, bombs out when server recycles). Assuming you just need to keep a small amount of information in the session state, what is the downside of using encrypted cookie items for this purpose rather than specific state servers/db’s? Obviously using cookies will create a small amount of network overhead, and clearly you operate under the assumption that cookies are enabled on the

session id cookie in gwt rpc

懵懂的女人 提交于 2020-01-22 06:45:05
问题 Assuming I'm rolling my own session code, what's the right way to generate a unique and secure session id cookie in java. Should I not be rolling my own but using something that's already been standardized? I'm using gwt and the google app-engine platform. How do I make sessions persist across browser/server restarts? 回答1: Using Servlet Sessions in GWT In the remote service implementation class: String jSessionId=this.getThreadLocalRequest().getSession().getId(); In the client code: String

ASP.NET session has expired or could not be found -> Because the Session.SessionID changes (Reporting Services)

懵懂的女人 提交于 2020-01-21 01:38:06
问题 1.-I'm using reporting services and sometimes I get this error ASP.NET session has expired or could not be found when I try to load a report. 2.-I realized that I get this error when the Session.SessionID property changes even though the user is the same. If it does not change, the report is loaded. I mean, if I refresh the report a number of times, whenever the Session.SessionID is the same than the last one, the report is loaded. 3.-Microsoft Documentation says: When using cookie-based

TChromium : How to keep session alive

杀马特。学长 韩版系。学妹 提交于 2020-01-16 07:04:29
问题 When using DCEF3 TChromium, how can i keep the session alive ? For instance, if i go to a web-site and login on it, when i close my app and open it again, i need to login again. I want to keep the session alive, just like it would be if i use Google Chrome. I tried to add 'CefLib' on my app 'uses' clause and set 'CefCache' like the code below, but although i can see files being stored on 'cookies' folder, it seems to make no difference in keeping the session alive : program Project1; uses

asp.net inproc vs out of proc performance

和自甴很熟 提交于 2020-01-16 00:49:09
问题 I'm considering moving our web app session storage from In Proc to State Server. Can anybody give any figures as to the performance difference? 回答1: I can't give you performance metrics but it won't be as fast as InProc session state due to certain overheads: Cross Process calls add overheads Objects have to be serialised and deserialised Some objects can't be serialised (XmlDocument for example or those that inherit from MarshalByRef) That said your session state data will survive

Losing my session variables

点点圈 提交于 2020-01-15 03:43:12
问题 I am using following code for session management. public class MyClass { public static int SomeProperty { get { return (int)HttpContext.Current.Session["MyID"]; } set { HttpContext.Current.Session["MyID"] = value; } } } Problem is once in a while I get "Object reference not set to an instance of an object." on get { return (int)HttpContext.Current.Session["MyID"]; } , although I know for fact that MyID was been set in session. Seem to me that for some reason that session is destroyed. Any

Why is it considered a good practice to make session scoped objects Serializable?

好久不见. 提交于 2020-01-13 06:13:26
问题 I often hear people saying that session scoped objects should implement Serializable ? Why it is so ? What will be the result if one doesn't do this ? Why not make this a part of the servlet specification then ? I know Tomcat doesn't complain if we do not do this . What about other app servers like JBoss, WebSphere or Weblogic ? 回答1: This allows the servlet container to either store the contents of a session on disk, or to transfer session contents over the network to another server. Why does

how to redirect user to default page on session time out in asp.net 3.5

爱⌒轻易说出口 提交于 2020-01-11 09:59:27
问题 i just want to redirect user to Home Page(Default.aspx) when session has been expired in asp.net 3.5. i just do it with web user control but steel it's not work perfectly. so i just want to do it with web.config. <authentication mode="Forms"> <forms loginUrl="~/SignIn.aspx" protection="All" timeout="2880" path="/" /> </authentication> Is this technique works in .net 3.5 framework application. 回答1: If you are using form authentication then you don't have to write any custom code. For session

Storing Session State in an ASP.Net Web Farm (Memcachedb or…?)

不羁的心 提交于 2020-01-07 08:55:13
问题 We have an ASP.Net [MVC] web farm (Windows Server 2008 R2 running IIS). For which we want to share session state across each box. I'm aware that we can do this with SQL Server, but understand that there is an overhead to this (someone mentioned a 25% drop in performance). Memcachedb keeps getting mentioned time and time again, however I can't seem to find a way to hook it into ASP.Net for the purpose of session state. Has anyone put together a successful implementation of Memcachedb with .Net

HTTP and Sessions

99封情书 提交于 2020-01-06 08:19:11
问题 I just went through the specification of http 1.1 at http://www.w3.org/Protocols/rfc2616/rfc2616.html and came across a section about connections http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8 that says " A significant difference between HTTP/1.1 and earlier versions of HTTP is that persistent connections are the default behavior of any HTTP connection. That is, unless otherwise indicated, the client SHOULD assume that the server will maintain a persistent connection, even after