|
Hi expert,
There is a managed c++ project, which is used to wrapper one Native c++ project. And then I will use it in ASP.Net.
When I call the method of one ref class of this managed C++ project, I will get the followed log in call stack. " msvcm90d.dll!<CrtImplementationDetails>::GetDefaultDomain() Line 390 + 0x8 bytesC++ msvcm90d.dll!<CrtImplementationDetails>::DoCallBackInDefaultDomain(int* function = 0x10F92EA0, bool cookie = false) Line 442 + 0x6 bytesC++ msvcm90d.dll!<CrtImplementationDetails>::DefaultDomain::Initialize() Line 284C++ msvcm90d.dll!<CrtImplementationDetails>::LanguageSupport::InitializeDefaultAppDomain() Line 519C++
"
And when call "MANAGED_ASSERT(pDomain->IsDefaultAppDomain(), "Expecting default appdomain")", I will get one error: "An exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll but was not handled in user code"
I try to research something for this kind of issue, and find there are some thoughts that this issue is caused by the difference ofAppDomain used by ASP and the native dll--Asp.net runs on non-default Appdomain, but the native dll runs on defautl Appdomain In order to verify it, I create a little example to test, and at an AppDomain check code at the begining of managed c++ class, and ASP class. And find both of them are runing on Non-default AppDomain, and this little example runs well. But in our code, this issue is still existing. I don't know the reason, do you guys have any good idea about this?
thanks, gavin Roc Over Sky |