I refer to a third-party library in an ASP.NET MVC application because the design of a library that requires a class (say, ClassA ) must be created only once and must be deleted after use. So, in my MVC application, I defined a static class and created an external ClassA inside ( ClassA ). But what is the efficient way to dispose of a single instance of ClassA ? I believe Application_End is the wrong place. but in which case is the method the right place for this?
I should review the iisreset scripts, repeat the application pool cycle, and any other cases where the server is stopping or restarting, and to make sure the resource is located correctly.
source share