session-state

How to determine if the browser session just started or if it's a subsequent click?

送分小仙女□ 提交于 2019-12-12 02:52:41
问题 I would like to figure out whether the browser session is brand new (user just fired up a browser and loaded my page) or a subsequent click-through. How can this be done with JavaScript? 回答1: Instead of window.referrer try document.referrer . I got it to work for me in chrome 回答2: You can use window.referrer , although that's not a foolproof method, because some browser settings hide it for privacy purposes. It should work fine with most default settings, though. It will give you undefined if

SQL Server State for large asp.net application and any advantages of writing own Custom Store Provider

早过忘川 提交于 2019-12-12 01:48:56
问题 Background We have a large asp.net application and uses a lot of sessions like datasets, datatables etc. We want to support web farms for this application, so we want to save the session state in sql server. I am successfully storing all the required data into the sql sever and getting all the data fine as well. Our supported database is SQL Server 2005-Sql Server 2008. We have to store datatables and datasets in sessions, even we know it is going to be bit expensive. Question I want to know

Popup while session timeout

若如初见. 提交于 2019-12-11 21:51:13
问题 How to set a pop up message box saying... "please end your session and start again" in my asp.net webform? 回答1: My first shoot is JS script with simple time counter. You should set max session time value and decrease it every one second - if == 0 then popup some message. When you reload page - counter will be reseted and start counting again. Good luck ! hsz 来源: https://stackoverflow.com/questions/1838760/popup-while-session-timeout

window.open() clears session

耗尽温柔 提交于 2019-12-11 18:54:31
问题 I have several portlets in my application. If I open a url using window.open() method, the session id changes and causes an error in other portlets. If I don't open this url, everything works fine. But once this new window is opened, the session is cleared and the rest of the portlets throws an exception since some values are missing. In the address bar of the browser I typed in javascript:alert(document.cookie); to see the JSESSIONID. It remains constant throughout the page and changes when

SessionState Timeout never fires

谁说胖子不能爱 提交于 2019-12-11 12:23:26
问题 What am I doing wrong. The sessionState Timeout never fires,It only fires after 24 hours, I want to let it fire in 20 minutes on my webpage. In the web.config I handle the sessionstate like this: <sessionState cookieless="false" mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" timeout="1" stateNetworkTimeout="1"/> timeout="1" is on purpose, for testing. And in the code I check on which session I am by calling

Can ASP.NET Session ID be the same on two machines at the same time?

别说谁变了你拦得住时间么 提交于 2019-12-11 09:32:54
问题 I have an ASP.NET application that uses Session.SessionID to prevent multiple users viewing the same data at the same time. I have a table that contains a set of images (stored in BLOB) that require processing. Only one user is supposed to be able to view the same image at the same time. To achieve this, as each record is retrieved by a user the record is updated with the Session.SessionID. This update occurs inside a ReaderWriterLock. I have done a test to ensure the ReaderWriterLock is

Configure SQL server to store session state

末鹿安然 提交于 2019-12-11 09:05:57
问题 I am trying to set up session state in SQL server. Command: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regsql.exe -ssadd –sstype c -d SomeName -S SERVERNAME -U someUser -P somePass It throws: The argument '-sstype' is invalid. Any tips? 回答1: Stupid. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regsql.exe -ssadd -d SomeName -S SERVERNAME -U someUser -P somePass –sstype c The arguments order... 回答2: You need to enable Agent XPs to run Aspnet_regsql.exe tool From Installing

How does variable scoping work in a POE session?

元气小坏坏 提交于 2019-12-11 07:49:12
问题 Can anyone explain how variable scoping works within a POE session? What is the proper way to pass state within the session, without impacting other sessions? Thanks Josh 回答1: Scoping is unaffected by POE. You can use POE's heap (accessible through $_[HEAP] ) to pass data around between your various handlers. According to the docs, the heap is distinct between sessions by default, but it is possible to override this so that different sessions share a heap. sub my_state_handler { $_[HEAP]{some

Sitecore switches user session with another user

*爱你&永不变心* 提交于 2019-12-11 06:56:47
问题 I have an FBA site that uses Sitecore. Every so often, it will confuse one user with another. What I mean is, somehow User A will unintentionally hijack User B's session. User A will be looking at a page that a) they don't have permission to view, and that's b) customized for User B. The one time I was able to reproduce (accidentally) , I got my original session back after I clicked through to another page. I know Sitecore leverages the Aspnet membership DB, so this might be an issue with

Session State persists across multiple computers

杀马特。学长 韩版系。学妹 提交于 2019-12-11 06:32:10
问题 Im sure it has nothing to do with persistance across Multiple Computers but seems quirky that a second website visit, would trigger a refresh of question & answers that are dynamically loaded to be displayed within a Ajax update panel. Session Interaction and logging Web.Config: <sessionState mode="InProc" cookieless="UseCookies" timeout="20" cookieName="ASPNET_Quiz" /> Global.asax: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Session("test") = "true" 'Used only to create a