ASP.Net Architecture Specific to Shared/Static functions

Posted by Maxim Gershkovich on Stack Overflow See other posts from Stack Overflow or by Maxim Gershkovich
Published on 2010-04-30T03:55:04Z Indexed on 2010/04/30 4:07 UTC
Read the original article Hit count: 245

Hello All,

Could someone please advise in the context of a ASP.Net application is a shared/static function common to all users?

If for example you have a function

Public shared function GetStockByID(StockID as Guid) as Stock 

Is that function common to all current users of your application? Or is the shared function only specific to the current user and shared in the context of ONLY that current user?

So more specifically my question is this, besides database concurrency issues such as table locking do I need to concern myself with threading issues in shared functions in an ASP.Net application?

In my head; let’s say my application namespace is MyTestApplicationNamespace. Everytime a new user connects to my site a new instance of the MyTestApplicationNamespace is created and therefore all shared functions are common to that instance and user but NOT common across multiple users. Is this correct?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about concurrency