“Operation could destabilize the runtime”. Have you got this error after publishing your working-and-tested-in-cloud-emulator-web-app to Azure web role? Me too.

But the error has nothing to do with Castle Windsor as you may conclude from the screenshot. After reading some posts about the error here, here, here, here and here I have come to the conclusion that the error has nothing to do with my program but with some internals of IntelliTrace that I am not familiar with. First hand solution is as suggested by Anton Staykov at stackoverflow.com. But in case you want to continue using IntelliTrace you can add an exception module in the IntelliTrace advanced settings as shown below. After you save the profile and publish it again you will have your app running as usual. Of course the module that is causing the crash may not be Castle Windows DI container in your caste but you get the point – Examine your exception stack, look at the namespaces and add the namespace with wildcard (*) at the end.
