S
Steve W
I have an ASP.NET app that calls into some VB.NET components. It passes in
the current application's cache (HttpContext.Current.Cache).
These VB.NET components also get called by a non-ASP.NET application (in
this case a VB.NET windows service). I'd like to create something like the
cache in this service to hold application-wide information (like database
connection strings) and then pass that into the components.
As a test, I tried creating a 'new' System.Web.Caching.Cache object in a
test VB.NET windows app, but I get an error when I try and insert something
into the Cache object created in this way (System.NullReferenceException)
which I assume is because I'm not in a proper HTTP Context etc.
Any suggestions as to the best way to architect this ?
Thanks
Steve
the current application's cache (HttpContext.Current.Cache).
These VB.NET components also get called by a non-ASP.NET application (in
this case a VB.NET windows service). I'd like to create something like the
cache in this service to hold application-wide information (like database
connection strings) and then pass that into the components.
As a test, I tried creating a 'new' System.Web.Caching.Cache object in a
test VB.NET windows app, but I get an error when I try and insert something
into the Cache object created in this way (System.NullReferenceException)
which I assume is because I'm not in a proper HTTP Context etc.
Any suggestions as to the best way to architect this ?
Thanks
Steve