By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,507 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,507 IT Pros & Developers. It's quick & easy.

XmlSerializer - Cannot execute a program csc.exe

P: n/a
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.ex e" /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.ExecWaitWithCaptu reUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(Compi lerParameters 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.FromSourceBat ch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(Co mpilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromSource (CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] 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(Xml Reader reader)
at System.Xml.Serialization.XmlSerializationReader.Re adSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read2_ArrayOfProductVariantEnt ity()

Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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!
Nov 18 '05 #2

P: n/a
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" wrote:
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.ex e" /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.ExecWaitWithCaptu reUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(Compi lerParameters 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.FromSourceBat ch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(Co mpilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromSource (CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] 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(Xml Reader reader)
at System.Xml.Serialization.XmlSerializationReader.Re adSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read2_ArrayOfProductVariantEnt ity()

Nov 18 '05 #3

P: n/a
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" wrote:
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.ex e" /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.ExecWaitWithCaptu reUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(Compi lerParameters 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.FromSourceBat ch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(Co mpilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromSource (CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] 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(Xml Reader reader)
at System.Xml.Serialization.XmlSerializationReader.Re adSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read2_ArrayOfProductVariantEnt ity()

Nov 18 '05 #4

P: n/a


"AndrewDotHay" wrote:
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.ex e" /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.ExecWaitWithCaptu reUnimpersonated(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCaptu re(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(Compi lerParameters 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.FromSourceBat ch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(Co mpilerParameters options, String source)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromSource (CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] 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(Xml Reader reader)
at System.Xml.Serialization.XmlSerializationReader.Re adSerializable(IXmlSerializable serializable)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read2_ArrayOfProductVariantEnt ity()

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.