EDITBIN gives LNK1104 (cannot open file)
asp.net, iis, stack-overflow
Solution
Understanding that you addressed your issue (presumably a Stack Overflow Exception) with the explicitly-create-threads workaround, here's the actual answer to your question:
The error provided ("cannot open file w3wp.exe") is, as described, a file access error or some sort. The documentation (http://msdn.microsoft.com/en-us/library/ts7eyw4s.aspx) lists all sorts of possible causes for this error, but you are likely encountering one of three issues:
- Maybe the file is in use because the process is running (make sure you stop all instances of w3wp.exe running on your system, regardless of who started the process - eg by stopping all application pools manually).
- Maybe you do not have permissions to edit the file because you did not start the VS command prompt "As Administrator".
- Maybe you do not have permissions to edit the file because it is owned by "TrustedInstaller", and even the "Administrators" group does not have write access. If this is the case, then to modify the file you would need to change the owner (eg http://helpdeskgeek.com/windows-7/windows-7-how-to-delete-files-protected-by-trustedinstaller/)
I had to deal with all three of these issues to be able to actually change the default max stack size in IIS on Windows 7.
But as you noted, the explicit thread creation will usually be a better idea if you CAN do this, as it will avoid the server-maintenance overhead of manually patching the w3wp.exe file every time a windows update modifies it.
Problem
I am trying to increase stack size of 32 bit IIS by using following command ``` EDITBIN /STACK:1048576 w3wp.exe ``` but facing following issue: ``` fatal error LNK1104: cannot open file w3wp.exe ``` I checked w3wp.exe is present in `windows/system32/inetsrv` folder.