Question

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?

Was it helpful?

Solution

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

OTHER TIPS

I had the same problem and discovered that i ran out of memory of sorts.

After checking Redhats "ANTS Memory Profiler" i found that i had a large amount of memory in the COM+ of the GC roots. A quick google and i found myself here: msdn XmlSerializers

I then read the following:

If you use any of the other constructors, multiple versions of the same assembly are generated and never unloaded, which results in a memory leak and poor performance. The easiest solution is to use one of the previously mentioned two constructors. Otherwise, you must cache the assemblies in a Hashtable...

After creating a hashtable for the serializers my problem of a memory leak (and poor performance) and the resulting error message like yours, was gone.

I resolved the same issue with an ISSReset

If AppLocker is enforced, please allow below (add as path exception)

c:\windows\MICROSOFT.NET\FRAMEWORK\V2.0.50727\CSC.EXE c:\windows\MICROSOFT.NET\FRAMEWORK\V2.0.50727\CVTRES.EXE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top