Request a topic or
contact an Arke consultant
August 2009

Arke Systems Blog

Useful technical and business information straight from Arke.

About the author

Author Name is someone.
E-mail me Send mail

Recent comments




The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2023

StackOverflowException in COM object called from a w3wp.exe process

The w3wp.exe has a stack reserve size set at 256kb.  I ran into a StackOverflowException while calling a COM object in ASP.NET  Anyway, I didn’t have access to the source code of the COM object.  But after a lot of reading and elp from others, I figured that the third-party dll must be setting a lot of local variables or going through a large recursive call.   So I attempted the following which fixed it. 


After step two you only have 60 seconds to perform step 3

1.) Download WfpDeprotect:

2.) Run:  wfpdeprotect.exe “c:\WINDOWS\system32\inetsrv\w3wp.exe”

3.) Run: editbin /STACK:1048576 “c:\WINDOWS\system32\inetsrv\w3wp.exe”

4.) Wait at least one minute

5.) Run: dumpbin /ALL /OUT:”c:\dumpbinresult.txt” “c:\WINDOWS\system32\inetsrv\w3wp.exe”

6.) Check the text file to make sure that the reserve stack size is now 1000000


This isn’t a permanent fix per-se.  Anytime the w3wp.exe is updated with Windows Update or something similar, the above steps will have to be re-run.

Posted by Trenton Adams on Friday, August 28, 2009 2:03 PM
Permalink | Comments (0) | Post RSSRSS comment feed