Hello Stephen,
Based on your description, my understanding on your problem is that you
have an ASP.NET web application which uses a managed C++ component library
that act as a wrapper of an unmanaged c++ dll. This application works well
when there is only single web application work in the Application Pool, but
get messed state management when running multiple web applications in the
same application pool(IIS), correct?
As you mentioned that the C++ unmanaged dll uses some static variables to
manage global connection pool(or other states), I think this should be the
cause of the problem. As for ASP.NET(or other .net framework/clr based
application), it is running at AppDomain based boundary, that means global
variables(stati c class members in .net applications) is only visible in its
own AppDomain, not in the entire host process(which is different from the
variable sharing scope for win32 application---process based scope).
For your scenario, in IIS6, all the ASP.NET applications (which use the
same App Pool) will be hosted in the same worker process, therefore, if
you've used any unmanaged c++ code which use global variables, they'll be
accessible by all the applications in the worker process no matter they're
in the same AppDomain or not. Therefore, I'm wondering whether it is
possible that you'll configure those applications to use separate
application pool(in IIS) if they'll access the same win32/c++ global
variables? So far this is the only means I can get to prevent the win32/
c++ global variables to be accessed by multiple applications.
Please feel free to let me know if you have any other concerns or ideas on
this.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.