"Globaly" declare object on Server-side.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!
I have a multi-layer business application written in VB.NET.
The client can be either a website or a webform communicting with the
bussines-layers through webservices.
In "Client-classes" i'm sometimes using Singletons to "store"
data which is frequently used and should be accessible from all
client-classes.
Now I want to use some kind of global declaration on the server to. I
want to be able to access the same object from all layers
(webservice-Business Rules-Data Layer). I tried to use singletons on
the server to, but realized that all the users and requests shared the
same Singleton object which I don't want.
 
Your best approach would probably be to declare the object in global.asax as
an appliation level object and it would then be accessible to your web
services business layer. You will need to manage locking etc. to stop it
being accessed for update by multiple clients.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Back
Top