session-state

ASP.NET 5 (Core): How to store objects in session-cache (ISession)?

纵饮孤独 提交于 2020-01-01 08:04:07
问题 I am writing an ASP.NET 5 MVC 6 (Core) application. Now I came to a point where I need to store (set and get) an object in the session-cache ( ISession ). As you may know, the Set -method of ISession takes a byte-array and the Get -method returns one. In a non-core-application I would use the BinaryFormatter to convert my object. But how can I do it in a core-application? 回答1: I'd go with serializing the objects to JSON and use the extensions methods on ISession to save them as string 's. //

RequestAcquireState Hanging on .NET 4.5.1 IIS8

人走茶凉 提交于 2020-01-01 05:21:08
问题 Under heavy load or when using jQuery's ajax abort function, we see requests build up in IIS to the point where no-one can connect and the entire site hangs, forcing a recycle. A similar post from 3 years ago had a similar issue with .NET 4.5 and IIS 7.5 but Microsoft have stated this was fixed in 4.5.1 and released a patch for 4.5. This problem on Windows Server 2012R2 using IIS 8 when trying to use State Server and even more so when using State Server on development machines running Windows

asp.net session state mode “SQLServer”

馋奶兔 提交于 2020-01-01 02:06:16
问题 "My website is LIVE. And this problem is related to configure session timeout on LIVE server and not in localhost." I have a problem with session expiring too soon. link in 2-5 minutes only. I tried lot of things and at last decided to store the session in "SQL Server" mode in my web.config file i have following coding: <sessionState mode="SQLServer" cookieless="false" timeout="45" sqlConnectionString="data source=xxx.xx.xx.xxx;uid=xxxxxxx;pwd=xxxxxxxx"/> and i have all the tables required in

.NET Session not working

时光毁灭记忆、已成空白 提交于 2019-12-30 07:41:41
问题 This is a weird one, but hopefully someone can give me an idea here. I'm putting a few values into session in the Session_Start of the Global.asax in my app. Immediately after the Session_Start my base page's OnInit gets called and tries to use one of those Session variables. The weird part is sometimes it works, and then after NO changes will start giving me this error: "Session state can only be used when enableSessionState is set to true , either in a configuration file or in the Page

Using jQuery to store the state of a complicated form

*爱你&永不变心* 提交于 2019-12-30 00:53:12
问题 I have a rather complicated form with many "steps" in it that are filled in by the user. Some steps (think of them as form segments) have default options, but on clicking a "enter custom values," they display a hereto hidden set of fields that the user can enter info in. Here is an example <div id="#s1_normal"> <input type="radio" name="mode" value="a"> Mode A <input type="radio" name="mode" value="b"> Mode B Choose one of the above for applying average coefficient values of "a" or "b" to 100

Session Timeout ASP.Net

不羁的心 提交于 2019-12-29 08:13:30
问题 I'm trying to increase the timeout on all sessions. The site is hosted with Godaddy, and it is written in Flash (client side of course) and asp.net on the backend. I've added this to my web.config, <sessionState timeout="720"> </sessionState> Is that really all that I need to do? I'd prefer to not let sessions expire ever, but I'm sure that the server needs to reclaim that memory at some point...I'm not storing anything in the session, really, just using it to track users' progress through

How does ASP.Net Cookieless work ?

99封情书 提交于 2019-12-29 07:42:07
问题 I try to set the <sessionstate /> in my web.config but I don't know what are they. I would like to know about ASP.Net <SessionState cookieless="" /> . <sessionState cookieless="*****"> AutoDetect UseCookies UseDeviceProfile UseUri true false Let me know with short note. 回答1: Specifies how cookies are used for a Web application. The cookieless attribute can be one of the following possible values. The default is the UseCookies value. Note When you configure an AJAX-enabled ASP.NET Web site,

How does ASP.Net Cookieless work ?

这一生的挚爱 提交于 2019-12-29 07:42:01
问题 I try to set the <sessionstate /> in my web.config but I don't know what are they. I would like to know about ASP.Net <SessionState cookieless="" /> . <sessionState cookieless="*****"> AutoDetect UseCookies UseDeviceProfile UseUri true false Let me know with short note. 回答1: Specifies how cookies are used for a Web application. The cookieless attribute can be one of the following possible values. The default is the UseCookies value. Note When you configure an AJAX-enabled ASP.NET Web site,

Sharing session state between 2 ASP.NET applications using SQL Server

拜拜、爱过 提交于 2019-12-28 06:32:09
问题 I'm working on a site that has a requirement to share session between a cms application and an online store application on the same domain eg. mydomain.com and store.mydomain.com I've made some progress with it and it works on my local build between localhost/cms and localhost/store Basically I have done what is suggested in this article http://blogs.msdn.com/toddca/archive/2007/01/25/sharing-asp-net-session-state-across-applications.aspx and hacked the TempGetAppID Stored Procedure to return

Select a way for Session Management on Windows Azure

十年热恋 提交于 2019-12-25 14:45:55
问题 I am planning for a application which will be deployed on Windows Azure. The web role will have multiple instances. I see that with multiple instances in-proc session will not work.I see that I have following ways to manage my session Use Azure Storage SQL Azure AppFabric I don't want to go with option 2 (SQL Azure). Which option should I choose? Update 1 I came across this post which demonstrates session affinity on Azure with Aplication Request Routing(ARR). How about going with this option