StackOverflowException loading XsltCompiledTransform

元气小坏坏 提交于 2019-12-21 12:14:02

问题


i have some big xslt crashing iis (StackOverflowException) when loading an XslCompiledTransform while the old (deprecated) XslTransform works fine. Is there some known issue with big templates? Strangely enough, the same XslCompiledTransform loads successfully in a win32 application.


回答1:


Ahh, you know the problem here is more due to IIS (I assume that it is a web app as you are trying it in a Win app too).

IIS (from Win2003 onwards) 'stupidly' only reserves a quarter of the normal stack space given to other programs. This is only 256KB, compared to 1MB.

To work around this issue, you can run this operation in a Thread. In the thread's constructor, you can specify a new stack reserve size. Try increasing the number till it works, without going over the top.



来源:https://stackoverflow.com/questions/316938/stackoverflowexception-loading-xsltcompiledtransform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!