Increase Stack size IIS ASP.NET 3.5

蓝咒 提交于 2019-12-07 07:51:29

问题


I understand that the default max stack size on ASP.NET was decreased to 256K instead of 1MB (see http://support.microsoft.com/kb/932909), how can I get it back to 1MB?


回答1:


You can use editbin, as described in this article.




回答2:


Another solution could be that of creating an explicit new thread to perform the operations where you're getting a stack overflow error

  Thread t = new Thread(Run, 4194304); // 4M of stack size
  t.Start();
  t.Join();
  if (loadException != null) throw loadException;

  void Run()
        {
            try
            {
              // Operation causing stack overflow
            }
            catch (Exception e)
            {
              ...
            }
        }

Regards

Massimo



来源:https://stackoverflow.com/questions/2319711/increase-stack-size-iis-asp-net-3-5

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