Receiving first chance exceptions of type Microsoft.XLANGs.RuntimeTypes.InvalidPropertyTypeException while processing a message through BizTalk 2004.
The exception was obviously handled somewhere in the runtime as we never saw it in any of our exception handlers, or the event log. Since we were never aware of the issue, its likely been occuring in our environments over the last year.
With help from Mike (MSFT), we began taking adplus crash dumps on first chance CLR exceptions. What we confirmed is that BizTalk was attempting to track properties that didn't exist in some documents, due to misconfiguration on our part.
Early on in our BizTalk development, we found that if we just turned on tracking for our property schema, it wasn't necessary to go enable tracking for all of the properties on all of our schemas. What a great shortcut! It just worked... This property schema tracking was enabled by going to HAT | Configuration | Messages and locating our property schema (SupplyChain.BizTalk.Schemas.PropertySchema) in the list and checking the 'Track' box for all entries.
Little did we know that we were silently throwing these exceptions in the background!
Since BizTalk was attempting to track all the properties in the property schema, for each message, an InvalidPropertyTypeException could be thrown and handled by the runtime many times per message.Solution
Unchecking tracking on our custom property schemas and enabling tracking on the message properties themselves cleared up the InvalidPropertyTypeExceptions.
Another early warning indicator was to include monitoring of the Perfmon counter
.NET CLR Exceptions\# of Exceps Thrown/sec
during our initial analysis.
Many thanks to Mike S. (MSFT) and Michael E. (MSFT) for their insight and assistance in resolving this issue.
Original newsgroup post can be found here.Technorati tags: BizTalk, Debugging