加载XsltCompiledTransform的StackOverflowException [英] StackOverflowException loading XsltCompiledTransform

查看:87
本文介绍了加载XsltCompiledTransform的StackOverflowException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在加载XslCompiledTransform时,我有一些大的xslt导致iis(StackOverflowException)崩溃,而旧的(不推荐使用的)XslTransform可以正常工作. 大模板是否存在一些已知问题?奇怪的是,相同的XslCompiledTransform可以在Win32应用程序中成功加载.

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.

推荐答案

嗯,您知道这里的问题更多是由于IIS(我假设它也是Web应用程序,因为您也在Win应用程序中尝试使用它).

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(从Win2003开始)愚蠢地"仅保留了分配给其他程序的正常堆栈空间的四分之一.这只有256KB,而1MB.

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.

这篇关于加载XsltCompiledTransform的StackOverflowException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆