Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ALL,

I have REST web service which is developed in .net framework 3.5. When I have deployed it in a Windows Server 2008, I have got the following exception.

Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\Winning\4bc8e684\8584f28c\5gvspa2j.cmdline".

Description:
XML
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Exception Details
XML
System.Runtime.InteropServices.ExternalException: Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\Winning\4bc8e684\8584f28c\5gvspa2j.cmdline".


Can anyone help me fix this?

Regards
Sebastian
Posted

1 solution

1) Try deleting temp files from the folder

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files.

2) Refer to this KB: BUG: "ExternalException: Cannot Execute a Program" Error Message When You Call WebServices from .aspx Page[^]

[Reference links]:

Cannot execute a program. (C# Web app error)
[^]

Cannot execute a program. The command being executed was [^]

This is very strange error which needs trial and error approach. I hope the above links would be helpful.

Regards..:laugh:
 
Share this answer
 
Comments
Sebastian T Xavier 4-Jul-13 3:02am    
thanks Rohan :)
Thanks7872 4-Jul-13 3:03am    
Most welcome Sebastian.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900