session-state

using static Dictionary instead of session asp.net mvc

白昼怎懂夜的黑 提交于 2019-12-25 08:48:37
问题 i have serialization problem with session(as i described here) so i used static Dictionary instead of session asp.net mvc public static Dictionary<string, object> FlightDict; FlightDict.Add("I_ShoppingClient", client); in this case user will override their values?are there any problem with that because they says with static variable users data can be overrided 回答1: Yes, you can change the static variables in the site, But You need to use this to change the data but that is not enough you need

Dynamic session state provider

怎甘沉沦 提交于 2019-12-25 07:35:08
问题 I wish to change the session state provider dynamically when a web page loads. Locally, while developing, we use the following: <sessionState mode="InProc" /> But production code runs like this: <sessionState mode="Custom" customProvider="CustomSessionStateProvider"> <providers> <add name="CustomSessionStateProvider" type="Library.CustomSessionStateProvider" applicationName="AppName" /> </providers> </sessionState> Is it not possible to change which provider the sessionState uses at runtime

How can I store Session information in a hybrid (Database + Memory) way?

纵然是瞬间 提交于 2019-12-25 03:50:45
问题 Memory is good for speed, but is limited, and therefore requires session time limits which then discard the session information permanently. Database is good for volume storage and catering for more users concurrently and having longer session times. But the increased latency per request is a significant overhead. How can I configure ASP.Net to use an SQL Database (or other database for that matter), and cache the most recent used Session data in memory? It would seem there is no inbuilt

How to get the session details in servicestack application from SQLServer using session id sent from mvc application?

廉价感情. 提交于 2019-12-24 12:24:21
问题 I have two applications deployed on different servers. 1) ASP.net MVC 4 web application with sessionState mode="SQLServer" for session management 2) Servicestack service application with sessionState mode="SQLServer" for session management ( yes i need session in service application ) both application share same database and tables for session management I am using following solution to have asp.net session in service stack application . Reconnecting to Servicestack session in an asp.net MVC4

ReportViewer Control and SQL SessionState in Remote SSRS Server Mode

一个人想着一个人 提交于 2019-12-24 11:27:30
问题 I have an issue with the way the ReportViewer Control uses SessionState. Background : We have a .NET 3.5 WebForms App, which uses the ReportViewerControl in RemoteServer mode As our application uses a framework that needs SessionState (using SQL Persistence), it seems the the ReportViewer control also hooks into SessionState. RV's use of session state is problematic: it immediately takes an additional 9k of serialization (in dbo.ASPStateTempSessions) After displaying a report, all further

ASP.NET session state not being shared in Redis

你。 提交于 2019-12-24 11:15:13
问题 We are planning to migrate from ASPstate to Redis to store session. We installed the Redis MSI package on one of the servers and the c# application is hosted on a different server. We have multiple web applications within single application hosted in IIS. The configuration for both applications looks like this: <sessionState mode="Custom" customProvider="MySessionStateStore" timeout="180"> <providers> <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host=

Cookieless sessions in asp.net

梦想的初衷 提交于 2019-12-24 10:54:04
问题 i was recently digging about cookieless sessions, i came accross an article which says that whenever the session is created on the server, its ID is stored in the cookies, on the client machine, i was being thought in my college that sessions are stored on the server, and if the sessionID is in cookies and cookies are stored in clients machine locally, how one can say that session are stored on server, is that right, that sessions are stored on server? if yes then what is the concept of

ASP.NET SessionState timeout

六眼飞鱼酱① 提交于 2019-12-24 09:26:29
问题 I use ASP.NET website on IIS7 where in web.config I have: <sessionState mode="InProc" timeout="20"></sessionState> But session doesn't keep 20 minutes, it works very strange, sometimes it expires in 1 minute or less, sometimes just redirect to other page. I need use mode="InProc". Who can help me, what is wrong and how to resolve this problem? Thanks! 回答1: If you have an application that is throwing unhandled exceptions, the application could recycle. Or, it could recycle because of memory

Session_End() alternatives for SQL Server session state

偶尔善良 提交于 2019-12-24 03:44:24
问题 I have an application in MVC4 which has some logic in the Session_End() method in Global.aspx.cs . However, I need to change the session state from InProc to SQLServer , and this means the Session_End() method will not get called. I've tried to effect a workaround but I couldn't get it to work. What are the alternatives, if any, to Session_End() ? All I need is the ability to run some logic when the session times out. 回答1: The session doesn't time out when SessionState is in SQLServer mode.

Handling Refreshes After Form Submission

佐手、 提交于 2019-12-24 03:06:17
问题 What is the best way to disallow a form to resubmit on a refresh? !IsPostBack doesn't handle refreshes. I have tried using a bool variable that sets to true on initial submission, but it seems to be resetting every time I load the page. I've read a bit about cookies but I'm not sure how to setup these up to pass between pages. My setup is: Default.aspx (& Default.aspx.cs) Results.aspx (& Results.aspx.cs) Do I setup cookies in web.config like SessionState? Is there something better to use than