session-state

ASP.NET: Is it possible to keep complex object such as list<> is the session?

旧时模样 提交于 2019-12-10 17:53:39
问题 ASP.NET: Is it possible to keep complex object such as List<object> is the session? If yes, how to do so? I'm trying to keep a list in the session, but I'm being told that I cannot convert that List to a string. EDIT [Serializable] public class Client { public string ClientType { get; set; } public string ClientName { get; set; } public string SubClientName { get; set; } public string Project { get; set; } public string Service { get; set; } public string Activity { get; set; } } List<Client>

How is session object timeout handled in ASP.NET with SQLServer as sessionState mode?

放肆的年华 提交于 2019-12-10 15:55:20
问题 How, or maybe where, is the session timeout handled when you set SQL Server as state handler in an ASP.NET application? Is it the .NET framwork who after loading session objects from the DB does a judgement on whether or not the objects are expired, or is it a job on the SQL Server itself that takes care of this? The reason I suspect (or even concidered) the latter possibility, is that the script that created the ASPState mentioned something about a ASPState_Job_DeleteExpiredSessions-element.

The process or thread has changed since last step

半世苍凉 提交于 2019-12-10 14:59:28
问题 I'm debugging some of my code on Visual Studio. This code belongs to a custom Session Provider that I created, and I'm debugging it on my web application launch. It starts initializing my provider, and on that function I have a breakpoint that is being hit successfully the first time. However, that same breakpoint is being hit again, but it has a small blue icon and if you hover over, this message is displayed: The process or thread has changed since last step On my research I've found

Can I use ASP.NET Session[] variable in an external DLL

只愿长相守 提交于 2019-12-10 14:55:15
问题 I have two projects, the DLL project which has all my logic and data access stuff, and the ASP.NET project which does my forms etc. I am a bit confused. I thought if I added the System.Web namespace reference to the DLL project I would be able to reference the Session state information of the ASP.NET page. I could use each page to get the session info out and pass it to the DLL for the processing but would love to be able to process things directly from the DLL class(s). Is this possible? I

PHP session index undefined after header redirection?

拥有回忆 提交于 2019-12-10 13:30:01
问题 I have struggled with this for hours but I can't get it to work. When I do a redirection to another PHP page, all my session variables are null. I am on xampp server. session.php <?php session_start(); if(isset($_POST['submitted'])) { $_SESSION['first_name'] = "MAX"; var_dump($_SESSION); header("Location: http://localhost:8080/secure login/session2.php"); die(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http

How to start ASP.Net State Service in Azure

与世无争的帅哥 提交于 2019-12-10 11:04:34
问题 While deploying my application in azure i got this error when a session variable is used I know this error is due to ASP.Net state server mode . I started the service in my local PC but how to start this service in Azure environment? 回答1: You can use a start up task to spin up the State Service (or really any service for that matter). However, I would highly recommend that you do not use the session state service. I'd recommend looking at the In Role Windows Azure Cache or the Windows Azure

using sessions in asp.net

為{幸葍}努か 提交于 2019-12-10 10:39:47
问题 I would like the data that i enter in a text box on pageA to be accessable on pageB eg: User enters their name in text box on page A page B says Hello (info they entered in text box) I heard this can be accomplished by using a session but i don't know how. can someone please tell me how to setup a session and how to store data in it? Thank you! 回答1: Session["valueName"]=value; or Session.Add("valueName",Object); And You can retrieve the value in label (for Example) By /*if String value */

How to get SessionID on a request where EnableSessionState=“False”

孤者浪人 提交于 2019-12-10 07:09:24
问题 I want to be able to get the SessionID of the currently authenticated session in a WebMethod function where EnableSession = false . I cannot set EnableSession=true on this request, because another (long running) request on a different page is keeping the SessionState locked (EnableSessionState == "True" not "Readonly"). Is there a consistent way of getting the SessionID from either the ASP.NET Session cookie or the Url for cookieless sessions? I can code it myself but I would rather use a

Enabling Session State in SharePoint 2010?

二次信任 提交于 2019-12-10 02:50:05
问题 I have a web service built for SharePoint 2007 that I am trying to port to SharePoint 2010. This web service is dependent on session state to function properly, but so far, I have been enable to get session state to work at all in SharePoint 2010. This web service runs as its own web application under t he /_vti_bin virtual directory. I have tried all of the following with no luck: Ensured the "State Service" service application is running. Added the System.Web.SessionState.SessionStateModule

What is the difference between Session.Abandon() and Session.Clear() in ASP.Net?

无人久伴 提交于 2019-12-10 01:09:52
问题 What is the difference between Session.Abandon() and Session.Clear() in ASP.Net? 回答1: Session.Abandon() will end the current session. Session_End will be fired and the next request will fire the Session_Start event. Session.Clear will just clear the session data and the the session will remain alive. Session ID will remain the same in both cases, as long as the browser is not closed. In a nutshell: Session.Abandon(); cancels the current Session . Session.Clear(); clears all values from