Understanding that you solved the problem (presumably an exception) with a workaround explicitly create-thread, the answer to your question:
The provided error ("cannot open the w3wp.exe file"), as described, is an error accessing the file or some kind. The documentation ( http://msdn.microsoft.com/en-us/library/ts7eyw4s.aspx ) lists all sorts of causes for this error, but you probably ran into one of three problems:
- Perhaps the file is used because the process is running (make sure you stop all instances of w3wp.exe running on your system, regardless of who started the process, for example, by manually stopping all application pools).
- Perhaps you do not have permission to edit the file because you did not run the VS “As Administrator” command line.
- Perhaps you do not have permission to edit the file, because it belongs to "TrustedInstaller", and even the "Administrators" group does not have write access. If so, then to change the file you will need to change the owner (for example, http://helpdeskgeek.com/windows-7/windows-7-how-to-delete-files-protected-by-trustedinstaller/ )
I had to deal with all three of these issues in order to be able to actually resize the default maximum size in IIS on Windows 7.
But, as you noted, explicitly creating threads will usually be better if you CAN do this, as this will avoid manual server maintenance overhead by fixing the w3wp.exe file every time a Windows update changes it.
source share