I have a ASP.net 2.0 application that I am trying to debug live using Windbg and SOS.dll. When I attach the debugger to the process, I see it loads both 2.0 and 4.0 versions of CLR.[ mscorwks.dll and CLR.dll].I load my SOS by - .loadby sos mscorwks. After this, none of my SOS commands work. I get "Failed to request threadstore", "Unable to get info from System domain" etc.
I learnt this is due to the mismatch in the mscordacwks.dll for the different version of CLR. But all the solutions that I found on google around loading the right version of mscordacwks using cordll command failed to solve my problem. Particularly, I have used .cordll –ve –lp but doesnt seem to make any difference. Upon executing "!threads" commads again, I get
"CLR DLL status: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll
Failed to request threadstore"
I have seen another entry in stackoverflow around this problem. But luckily for him the problem disappeared before a solution was suggested and also this is not a duplicate of this entry
Any clue to help me use SOS exention with 2 versions of CLRs loaded into my process would be greatly appreciated.
MSCORDACWKS versions loading behaviour is as follows -
**0:033>** .cordll -e
CLR DLL status: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll
**0:033>** .cordll -ve -u -lp C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscordacwks.dll
CLR DLL status: No load attempts
**0:033>** .cordll -e
CLR DLL status: No load attempts
**0:033>** !threads
CLRDLL: Loaded DLL C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll Failed to request ThreadStore
.cordll -ve -lp
? – Humour