I have an asp.net application running in a server farm. So In-proc sessions are out. There’s no state server. There’s a sql server database (can’t be used for state server). There’s no forcing same web server serving capabilities so no guarantee which web server will serve next page.
I need to save a block of data (big object state) between pages. I don’t want to use viewstate because data could be large and don’t want it to go across the wire.
I could use the database to save the data and use the record id across the wire in a viewstate and retrieve the data for the next page.
Are there better solutions?
Well, I guess you’ve ruled out most options already. And assuming you cannot install other services, two other possibilities come to mind:
As in the SQL Server version, don’t forget to clean up your data somehow; option 1 is pretty similar to SQL Server in that regard, but in case of SQL Server it could simply be a centralized cleanup job, in the file share case the question becomes: which server is the center?
*) You could, of course, try to spawn a secondary process from ASP.NET. The problem here becomes: what if that process has problems? It’s not manageable for your sysadmins by default, unless you make it manageable.