I think I need some help understanding how static objects persist in an ASP.Net application. I have this scenario:
someFile.cs in a class library:
p
Each request to an asp.net site comes in and is processed on it's own thread. But each of those threads belong to the same application. That means anything you mark as static is shared across all requests, and therefore also all sessions and users.
In this case, the MyFunc
function that's part of your page class is copied over top of the static Func
member in A
with every page_init, and so every time any user does a page_init, he's replacing the A.Func
used by all requests.