The Bull Og

Onine since 1994. Offline since 1976.

See also the archive

An individual post follows.

I was trying to make use of Jeni Tennison's extension for evaluating a string query (found here among other places) when I kept on getting "HRESULT: 0x80131418." Even when I stepped through the code I couldn't find any more information about the exception so I Googled it to see what I could find. Long story short, it appears to be a security policy exception. Ah... that might make sense. We're compiling the stylesheet script at run time so the managed code environment looks like it's doing its job by enforcing whatever security policy's in place. Ok, what's the workaround? I tool a look at the most appropriate MS documentation I could find. It says: "Support for embedded scripts is an optional XSLT setting on the XslCompiledTransform class." "Script support is disabled by default" "XSLT scripting should be enabled only if [...] you are working in a fully trusted environment." Ah, clues... "XslCompiledTransform" is only defined in .NET 2.0. The transformation is happening within a .NET 1.1 command-line application I'm running on my machine. Hmmm... To solve the problem, I just changed the local security settings with caspol.exe and the stylesheet script compiles and runs.