The default stack size of IIS starting with Windows Server 2003 was changed. Prior to 2003, it was set to 1 MB but in 2003 and later, it is set to 256 KB.
You can change it with The Microsoft COFF Binary File Editor (EDITBIN.EXE).
Example:
EDITBIN /STACK:1048576 w3wp.exe
You can use DUMPBIN utility, which is provided with the 32-bit version of Microsoft Visual C++, to view the sizes: