I don’t write code. Well compileable code anyway. Now scripting, I’m ya man, but anything that does stuff ‘behind the scenes’ is frankly a little bit beyond me.
So I was filled with doom when one of our web developers was getting an error every time she tried to load her dev copy of the site into her browser. IIS7 simply gave the very detailed but unhelpful message
HRESULT: 0×80070057 (E_INVALIDARG))
Along with a pretty error page and some bits of XML. Googling that error code led me to this site which thankfully explained what was going on, and more importantly, how to fix.
Seems that when you build/compile a .NET site, it takes copies of the binaries from your solution and copies them to a temporary folder. The site is then hosted from the files in this temporary location.
Should your system crash mid-build/compile (she was using Vista, of course it crashed !) then the file(s) copying at the time may not quite be up to scratch (i.e. corrupted).
For x64 bit systems the path in question is
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
For x86 bit systems the path is
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
Inside the ‘Temporary ASP.NET Files’ folder will be many sub folders. You can spend time trying isolate the exact subfolder containing the knacked files, but I just deleted all the sub folders and then rebuilt the web solution again and ‘Presto’ a working site
The site owner Dan Abdinnor credits his friend Patrick Fitzsimmons for working all this out. I don’t know who you guys are, but thanks, you possibly saved me from hours of diagnostic tools and head scratching on this one !

Happy I could help!
themes…
Loved your article, thanksfor the read……