Friends, I don't think the MFC newsgroup is right for this question, so I'm
trying here...
We have legacy MFC DLLs that implement most business logic of our
proprietary API. We have nice managed classes to wrap the unmanaged
objects, and we make calls, get results, clean up. Certain unmanaged
objects persist as part of the ASP.Session so that their state and
functionality is available across requests. And, things timeout as
appropriate, things are cleaned up, and all things work.... mostly.
Since W3WP grab threads from a pool to process a request, any given
ASP.Session might be handled by differing threads from request to request.
All our classes are (pretty darned) thread safe, but we have issues that we
think might be related to the fact the objects might be created by a request
being serviced by thread 5, those objects will be persisted with the
ASP.Session, and a subsequent request might access those objects from thread
10 next time.
I have searched MS, used Google, and hunted the newsgroups, but I have found
no words of caution when using unmanaged stuff within ASP.Session. Nor have
a found any specific warning about using MFC classes that might be
hosted/called from a W3WP environment.
Does anybody have any thoughts, words, links, or anything at all that might
help enlighten our team.
We are somewhat desperate and uninformed at this point, and any of your time
and thoughts will be very much appreciated.
Thanks in advance,
James
James Hunter Ross
Senior Software Developer
O'Neil Software, Inc.
>> Stay informed about: Using MFC-based objects in ASP.NET...