I have a winform app that calls a web service to check for updates. This works in dev and it also works everywhere else I’ve tried it, just not on the installed copy on my machine (which happens to be the same in dev).
The error is:
Cannot execute a program. The command being executed was ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe’ /noconfig /fullpaths @’C:\Documents and Settings\Giovanni.DOUBLE-AFSSZ043\Local Settings\Temp\squ8oock.cmdline’.
The firewall is disabled and I’ve looked for ‘C:\Documents and Settings\Giovanni.DOUBLE-AFSSZ043\Local Settings\Temp\squ8oock.cmdline’ and it is not there. Note that every time I try to use the web service the ‘.cmdline’ file is different, for example the second time I ran it it was ‘dae8rgen.cmdline.’ No matter what name it has, I can never find the file.
Any suggestions?
The ‘.cmdline’ file is an autogenerated file produced by the .NET framework. The application is attempting to real-time compile an XML Serializer used to parse the data from the web service.
Have you verified that you can execute ‘csc.exe’ from a command-line window? Even just typing ‘C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /?’ should get you a list of compiler options (or should give you an error if you don’t have permissions to execute it).
What user account are you running this under, and does it have permissions to execute .exe files in the windows directory? Similarly, I know you said this happens with the installed copy on your machine, but is it possible it’s executing off a network share and receiving limited Code Access Security permissions which would prevent it from running local executables?
For reference, here is a KB article showing a similar error that can occur in ASP.NET when the user account doesn’t have enough permissions. http://support.microsoft.com/kb/315904