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: http://www.bitsum.com/wfpdeprotect.php
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.