XmlSerializer - Cannot execute a program csc.exe

G

Guest

Periodically, we see an ASPX page fail with this appearing in the logs. Any ideas? It happens about every 3 to 4 hours, requiring a restart of the application domain to resolve it. Is this a COM Interop memory leak of the serialization code? It works great for a while and then crashes.

Only thing close to this document thus far is KB #306158, but my issue is just an ASPX page calling some biz logic that uses the Xml.Serialization namespaces. Its all running under the ASPNET account, nothing fancy.

Exception Information
*********************************************
Exception Type: System.Runtime.InteropServices.ExternalException
ErrorCode: 8
Message: Cannot execute a program. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig @"C:\DOCUME~1\CPQX61\ASPNET\LOCALS~1\Temp\9uygnoyn.cmdline".
TargetSite: Int32 ExecWaitWithCaptureUnimpersonated(IntPtr, System.String, System.String, System.CodeDom.Compiler.TempFileCollection, System.String ByRef, System.String ByRef, System.String)
HelpLink: NULL
Source: System

StackTrace Information
*********************************************
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
at MyCustomCatalog.MyProductVariantEntity.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ArrayOfProductVariantEntity()
 
N

Natty Gur

Hi,

ExecWaitWithCaptureUnimpersonated is called as part of page compilation.
Its part of page processes that converts your declaration in ASPX file
(HTML) into code and compile it into assemblies. 9uygnoyn.cmdline will
help you find the files that ASP.NET tries to compile. You might find
any clue by going through them.

Page compilation should be done once. It appears that in your case it
happened more then once. ASP.NET recompiles all pages if you change
files in BIN folder. What I suggest you here is to check if you writing
any log file into application bin directory.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
G

Guest

I've the same problem, too...
I have it happens from time to time:
I'm using impersonation and the user I'm impersonating has execute permession to the MS.NET/Framework/<version>/etc...

I suppose it's somewhere a bug with Serialization.... and the cause of the compilation is becuase the Serializare create and compile each time you serialize...

Simone

AndrewDotHay said:
Periodically, we see an ASPX page fail with this appearing in the logs. Any ideas? It happens about every 3 to 4 hours, requiring a restart of the application domain to resolve it. Is this a COM Interop memory leak of the serialization code? It works great for a while and then crashes.

Only thing close to this document thus far is KB #306158, but my issue is just an ASPX page calling some biz logic that uses the Xml.Serialization namespaces. Its all running under the ASPNET account, nothing fancy.

Exception Information
*********************************************
Exception Type: System.Runtime.InteropServices.ExternalException
ErrorCode: 8
Message: Cannot execute a program. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig @"C:\DOCUME~1\CPQX61\ASPNET\LOCALS~1\Temp\9uygnoyn.cmdline".
TargetSite: Int32 ExecWaitWithCaptureUnimpersonated(IntPtr, System.String, System.String, System.CodeDom.Compiler.TempFileCollection, System.String ByRef, System.String ByRef, System.String)
HelpLink: NULL
Source: System

StackTrace Information
*********************************************
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
at MyCustomCatalog.MyProductVariantEntity.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ArrayOfProductVariantEntity()
 
G

Guest

I've the same problem, too...
I have it happens from time to time:
I'm using impersonation and the user I'm impersonating has execute permession to the MS.NET/Framework/<version>/etc...

I suppose it's somewhere a bug with Serialization.... and the cause of the compilation is becuase the Serializare create and compile each time you serialize...

Simone

AndrewDotHay said:
Periodically, we see an ASPX page fail with this appearing in the logs. Any ideas? It happens about every 3 to 4 hours, requiring a restart of the application domain to resolve it. Is this a COM Interop memory leak of the serialization code? It works great for a while and then crashes.

Only thing close to this document thus far is KB #306158, but my issue is just an ASPX page calling some biz logic that uses the Xml.Serialization namespaces. Its all running under the ASPNET account, nothing fancy.

Exception Information
*********************************************
Exception Type: System.Runtime.InteropServices.ExternalException
ErrorCode: 8
Message: Cannot execute a program. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig @"C:\DOCUME~1\CPQX61\ASPNET\LOCALS~1\Temp\9uygnoyn.cmdline".
TargetSite: Int32 ExecWaitWithCaptureUnimpersonated(IntPtr, System.String, System.String, System.CodeDom.Compiler.TempFileCollection, System.String ByRef, System.String ByRef, System.String)
HelpLink: NULL
Source: System

StackTrace Information
*********************************************
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
at MyCustomCatalog.MyProductVariantEntity.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ArrayOfProductVariantEntity()
 
G

Guest

AndrewDotHay said:
Periodically, we see an ASPX page fail with this appearing in the logs. Any ideas? It happens about every 3 to 4 hours, requiring a restart of the application domain to resolve it. Is this a COM Interop memory leak of the serialization code? It works great for a while and then crashes.

Only thing close to this document thus far is KB #306158, but my issue is just an ASPX page calling some biz logic that uses the Xml.Serialization namespaces. Its all running under the ASPNET account, nothing fancy.

Exception Information
*********************************************
Exception Type: System.Runtime.InteropServices.ExternalException
ErrorCode: 8
Message: Cannot execute a program. The command being executed was "c:\winnt\microsoft.net\framework\v1.1.4322\csc.exe" /noconfig @"C:\DOCUME~1\CPQX61\ASPNET\LOCALS~1\Temp\9uygnoyn.cmdline".
TargetSite: Int32 ExecWaitWithCaptureUnimpersonated(IntPtr, System.String, System.String, System.CodeDom.Compiler.TempFileCollection, System.String ByRef, System.String ByRef, System.String)
HelpLink: NULL
Source: System

StackTrace Information
*********************************************
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at System.CodeDom.Compiler.CodeCompiler.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlRootAttribute root)
at MyCustomCatalog.MyProductVariantEntity.ReadXml(XmlReader reader)
at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ArrayOfProductVariantEntity()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top