Hi,
I am in the process of converting an Oracle forms application to Asp.Net. Currently I am using a WCF web service to manage all of my Oracle database calls and to convert the data in to business objects. The business objects can then be easily consumed by the Asp.Net application. All of this works fine.
The problem I am having is with performance on the service. Since my instancing mode is per call the webservice needs to recreate the state/security object on every call. The state object includes a database connection, security parameters, and various other values that are required to set the users context.
Based on what I have read the best way to accomplish this is to store the state objects in memory/static variable and to provide some sort of reference to the client that it can use on each service call. I understand that memory is volatile and can be recycled for various reasons in IIS, this is fine since the data in question is not important and can be regenerated. The objects to be stored are not that large, but they are created from several complex queries, and doing this on each service call is very expensive.
Can someone give me some code examples of the best method of storing this data in memory on the web service?
Thanks