Environment:
Windows Server 2003 R2 Enterprise 64bit, SP2
.NET framework is supposedly installed (2.0 SP2, 3.0 SP2, 3.5 SP1)
I say \"suppo
I had this problem. I deployed an .EXE to a Windows 2003 that doesn't support .NET 4.5. I rebuilt the program with .NET 4 and it worked.
Have you tried running:
aspnet_regiis -i
from the command line?
Also check your application pool. In a 64-bit environment, you may need to set "Enable 32-bit applications" in Advanced Settings.
I had a similar error with IIS7 on Windows Server 2008 64 Bits.
The fusion log is not of any help here, and it turned out that in my case there was a third party assembly that was referencing a 32 Bits only assembly or native dll. (Xceed to be precise)
To find which assembly is being loaded by the 64 bits runtime :
Remember that all assemblies placed in the bin directory are loaded, regardless of their actual implication in the application.
I had "%1 is not a valid Win32 application." error message because my PATH environment variable was messed up. Well, more specifically, the PATH itself had nothing wrong with it. Instead, I had accidentally created a file named "C:\Program" that was used instead of "C:\Program Files\" for path lookup. The accidental creation of "C:\Program" was a result of calling Notepad++ on the command line for C:\Program Files\test.txt (without quotation marks), so Notepad++ thought I was trying to edit a file called "C:\Program" and created the file for me.
I had "%1 is not a valid Win32 application." error message because my PATH environment variable was messed up as well. It included this garbage from a python install:
%PYTHON_HOME%;
%PYTHON_HOME%\Scripts;