-
-
I do support on a SharePoint Portal (2003, Framework 1.1). Last week after we deployed some new functionality we started to get very strange errors. The portal would just break at random arbitrary functions. I traced the root cause to the following warning in the System Event Log:
A process serving application pool 'X' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was 'X'. The data field contains the error number.
After investigating the application log for hours, days I found nothing but errors caused by the chain reaction of error in the application log. However we would receive this error quite often.
Common Language Runtime detected an invalid program.
Then eventually it logged an error that basically said that it’s failing to compile a temporary file.
Cannot execute a program. The command being executed was "c:\windows\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig @"C:\WINDOWS\TEMP\lannijk8.cmdline".
Thinking I had found the problem I delete the windows temp and the Asp.net temp directories. However a couple hours later the error was back, but not logging the Compile issue, only the warning in the system event log. Googling the errors, didn’t return anything that made any sense.
Eventually we figured out (after reading this article) that when I added an extra Web Method to an existing web service, the generated Web Service had too many local variables. I don’t know what the exact number is for .net 1.1 but for 2.0 its 32767, which is really a lot.
See .net declares a local variable for each method and parameter in your web service and compiles this class.
So we resolved the issue by removing some of the web methods, but if this is not an option there's a hotfix available to raise that limit to 4 million.