We have an ASP.NET web application, which is a C# DLL, that references a C++/CLI DLL, that links against some native static libs.
When we edit the web.config file, the appdomain unloads itself as expected, however at the next web request the application crashes with some access violation exception from our native code.
Further investigation has shown that as soon when the app domain "unloads", the w3wp.exe process actually lives on, and it only unloads our C# DLL (and not our C++/CLI DLL). This is probably why we're getting these exceptions.
How can we stop this madness? Can we get ASP.NET to completely recycle the w3wp process upon web.config update? Can we get ASP.NET to actually unload all of our DLLs if w3wp lives on?