R
Robert Pettersson
Hi,
I have an object that takes 30-60 seconds to create/instanciate and I want
to use it for all users in my website.
I first thought about storing it in a cache or something, but since it is
not serializable that was not possible.
So I have created a singelton function of my object so that my webservice
will have it as an static varibla,but since it takes
so long to create the static variable I want to have control over when it is
created.
The static variable will live inside one of my webservices and I would like
to create it when the application starts.
I could use global.asax and the app_init or app_start events. But then it
will be created on the first time the application
is accessed not started. That would make the first user experience bad. And
I would like to know that the instance exists the
first time a user a accesses the site.
Is there any way I can do this? Could I do this with some function in IIS
combined with code (like App_Init or Start) or would
it help me if I created my own webservice host, like a winapp or winservice?
Or would I loose a lot of functionality by not
hosting my service in IIS?
Would be very greatful for suggestions on possible solutions to my problem.
Thanks
/Robert
I have an object that takes 30-60 seconds to create/instanciate and I want
to use it for all users in my website.
I first thought about storing it in a cache or something, but since it is
not serializable that was not possible.
So I have created a singelton function of my object so that my webservice
will have it as an static varibla,but since it takes
so long to create the static variable I want to have control over when it is
created.
The static variable will live inside one of my webservices and I would like
to create it when the application starts.
I could use global.asax and the app_init or app_start events. But then it
will be created on the first time the application
is accessed not started. That would make the first user experience bad. And
I would like to know that the instance exists the
first time a user a accesses the site.
Is there any way I can do this? Could I do this with some function in IIS
combined with code (like App_Init or Start) or would
it help me if I created my own webservice host, like a winapp or winservice?
Or would I loose a lot of functionality by not
hosting my service in IIS?
Would be very greatful for suggestions on possible solutions to my problem.
Thanks
/Robert