Wednesday, 15 September 2010

c# - Store large amounts of data per session ASP.NET MVC -



c# - Store large amounts of data per session ASP.NET MVC -

my mvc based application, hooks web services send lots of data! using same, render views. web services slow , out of control. store info per session, afraid that, bring downwards web server knees. few hundred users, web server run out of memory.

is there way can store session info in file per session? more looking @ out of box open source solutions.

i welcome, new suggestion well!

you can store pretty much object in session storage, few exceptions related running on server farm. i'm going ignore cases here however.

if you're dealing few mb of data, storing in session object (or cache, @rick suggests) isn't major problem. 1 time info has been returned web service , parsed own internal info structures, place info structure's root object session. utilize method store results of database queries take long time run, when query criteria unlikely alter frequently.

for larger info sets should utilize database store information. create tables match construction of info you're returning , tag info in way indicate how old , criteria used when fetching it. update required, , query database records on each client request.

there plenty of other options, including creating temporary files store info using sessionid identify them, recommend investigating database alternative first.

c# session asp.net-mvc-4

No comments:

Post a Comment