"Globaly" declare object on Server-side.

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.
 
J

John Timney \(ASP.NET MVP\)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top