Hello,
This question is about App domains and Sessions. Is it possible to have IIS run each User Session in a seperate App Domain. If Yes, Could you please let me settings in the config file that affect this.
Regards, Anil.
Hello,
This question is about App domains and Sessions. Is it possible to have IIS run each User Session in a seperate App Domain. If Yes, Could you please let me settings in the config file that affect this.
Regards, Anil.
I don't know of a way in which this could be easily done. Please explain your problem further as to why an AppDomain is necessary - it may be easier to just move Application collection use to Session.
Update: The correct solution to your problem is, unfortunately, to re-architect the library for a server-based session solution. What you could do, and I strongly do not recommend this, is create an AppDomain per Session, storing a reference to it in Session, and then relying on calls such as CreateInstanceAndUnwrap
, magic strings, and reflection (with no real compile time checking) to load an instance of the library per user. I imagine that if you pursue this solution you will spend much more time in total debugging it and dealing with errors than you would if you did a re-architecture time investment upfront.
This is not possible under Windows 2000 or Windows 2003 running ASP.NET 1.x or ASP.NET 2.0 (even with .NET Framework 3.5 installed). The same applies to ASP.NET running on IIS7.
A possible workaround (which certainly wouldn't scale) would be to create a windows service to manage the starting and stopping of new processes and communicate with that service from the web application using WCF.