session-state

Handler with IRequiresSessionState does not extend session timeout

江枫思渺然 提交于 2019-12-20 05:11:21
问题 I have a handler, like this, using IRequiresSessionState: public class MyHandler : IHttpHandler, IRequiresSessionState { // code } In the code, I am able to read and set Session values. I also check ensure that the caller is logged in. That all works fine. The web site uses forms authentication, so in the web.config, I have this: <authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="10" slidingExpiration="true"></forms> </authentication> The problem is that AJAX calls from the

Struts2: Session Problem (after reverse proxy)

风格不统一 提交于 2019-12-20 03:45:40
问题 I store session parameters in a Struts2 session map that I get in my actions using the SessionAware interface. My Application is in the /MyApp path. After setting up the struts2 application on an Apache server with an inverse proxy redirect that makes the URL http://www.appdomain.com/ point to my local tomcat on localhost:8080/MyApp , Struts2 session handling doesn't work anymore. I expect that the session cookies are stored for the Struts2 context of http://localhost:8080/MyApp instead of

How do I enable session support in Google App Engine (Java)?

元气小坏坏 提交于 2019-12-19 20:11:39
问题 How do I enable GAE session support using Java? Also, a related question: I only want to store a small amount of state in sessions (basically, just a key) -- will GAE store this information in a client-side cookie, and if so, how secure is that approach? Thanks! 回答1: For the first question. In your appengine-web.xml have: <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> ... <sessions-enabled>true</sessions-enabled> </appengine-web-app> 回答2:

Get session object from sessionID in ASP.Net

左心房为你撑大大i 提交于 2019-12-19 19:45:11
问题 Is there anyway to get a session object from a sessionID ? I have a small project using a Flash upload to let a user upload their file to the server, but the problem is that Flash has some error when sending the session and cookie (in Firefox or Chrome, but not IE), so I found a solution to fix this problem: sending the sessionID through Flash to the server, and on the server, decode sessionID back to the session object, but I don't how to do it. I'm using ASP.NET and C#. Can anyone advise me

Why Can WebMethod Access Session State Without EnableSessionState?

北城余情 提交于 2019-12-19 12:55:00
问题 I have a method on a page marked as a [WebMethod] that uses some session state as part of its operation. After I wrote this code, I suddenly had a flash of memory that you need to use EnableSessionState when you use session state in a [WebMethod] (e.g. see here: http://msdn.microsoft.com/en-us/library/byxd99hx.aspx). But it seems to be working fine. Why? Sample code behind: protected void Page_Load(object sender, EventArgs args) { this.Session["variable"] = "hey there"; } [System.Web.Services

ASP.NET Session_End event not firing

故事扮演 提交于 2019-12-19 07:52:17
问题 I'm trying to get a database transaction to execute when an ASP.NET session ends (in simple WebForms app on Windows 2008 Server). I realize that many respondents will suggest not to rely on the Session_End event (as I've read in a hundred forum posts on this topic yielded by a Google search). Please humor me. I've done these things: Enabled session state in web.config: <sessionState mode="InProc" cookieless="false" timeout="1" /> Confirmed that the Session_End event does NOT fire when I call

ASP.NET session id shared amongst browser tabs

耗尽温柔 提交于 2019-12-18 23:00:19
问题 I've recently been developing a website using asp.net webforms that uses in proc sessions and I noticed that session ids are shared amongst browser tabs. So I was wondering what you would do for the following situations: Problem: Multiple logins with different users in the one browser problem User opens browser tab 1, logins with "user1" - store in session User opens browser tab 2, logins with "user2" - store in session At this stage session information is now pointing to "user2" because of

Enabling Session State in ASP.NET MVC

旧巷老猫 提交于 2019-12-18 18:06:12
问题 I'd like to use session variables in my ASP.NET MVC application. I already added the <sessionState> tag in my web.config file like this <sessionState mode="InProc" cookieless="false" timeout="20"> </sessionState> I get a session ID in my url like this if I use cookieless="true" http://localhost:2967/%28S%28hcawmi55zoruuy453fbo3k55%29%29/RmdReqBankAccount But I still can't use session variables in my application. I set the variable like this in my login method: Session["username"] = userName;

Asp.Net 4.0 Storing Session in SqlServer

☆樱花仙子☆ 提交于 2019-12-18 13:47:08
问题 I Have Database provided by shared hosting. I want to store the session in sql server but it give me error: Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above [HttpException (0x80004005): Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.] System.Web

Profile Memory Usage of Session State ASP.Net

女生的网名这么多〃 提交于 2019-12-18 11:37:45
问题 I'm trying to figure out the size of a particular session state. On one of our heavy pages (lots of data in a table) it gets progressively slower. The issue is resolved by logging out of the system. I've profiled the page looking for JavaScript memory leaks, but I didn't find anything. My next plan of attack is too look at ViewState and Session State. ViewState will be simple, but Session State poses a challenge. Does anyone know of any tricks or tools that would help figure out the size of