W
wh
I really just need some reassurance that I'm doing the right thing really.
Here goes...
I have an object which needs to be available to all sessions. This is being
created in the Application_OnStart() event. Once created the object is
stored in the Application collection.
The idea of this global object is to manage resources (xml files) between
different sessions/users.
For example user #1 may require write access to file1.xml. If user #2
requests write access to the same file then the request will be denied. The
global object will have a method such as IsPageInUse() which will check
whether the requested page is already in use (I intend to store this
information in a collection) and return true/false accordingly.
What I'd like to know is how much support would I need to include in the
IsPageInUse() method to handle calls from multiple pages? I assume that
multiple calls can be made into the function (as opposed to one at a time
like with STA COM objects) and I will therefore need to add code to ensure
there are no race conditions when checking whether pages are in use, etc.
Thank you,
Wayne.
Here goes...
I have an object which needs to be available to all sessions. This is being
created in the Application_OnStart() event. Once created the object is
stored in the Application collection.
The idea of this global object is to manage resources (xml files) between
different sessions/users.
For example user #1 may require write access to file1.xml. If user #2
requests write access to the same file then the request will be denied. The
global object will have a method such as IsPageInUse() which will check
whether the requested page is already in use (I intend to store this
information in a collection) and return true/false accordingly.
What I'd like to know is how much support would I need to include in the
IsPageInUse() method to handle calls from multiple pages? I assume that
multiple calls can be made into the function (as opposed to one at a time
like with STA COM objects) and I will therefore need to add code to ensure
there are no race conditions when checking whether pages are in use, etc.
Thank you,
Wayne.