❔ asp.net MVC, can I store some data in a static variable to access in a future request??
I might need to modify a current process where user uploads a shit ton of data via excel.
the server side scan the data computes additional fields and then stores it in the DB.
if some rows have problems, i just send a error msg back.
I might have to change it where the server would have to scan all data and if errors are found, the user would be prompted to correct them, but I dont want them to reupload the data again and I dont want to transfer it back and forth between front end and back end because its too much data.
So is there a way other than database, I was thinking maybe a static class on server that could store the data ??
6 Replies
sounds like something that should still be stored in the database
definitely not a static class, a singleton service at worst
but its a website with like 2-3 users and only 1 user would ever use this feature
would the static class work in theory?>
in theory yes
in reality do not
woudlnt the singleton service instance die once the first request is sent
hmm i might try it out
or I might just create db table #982734982734928374
no, singletons are a single instance for your whole application
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.