XmlSerializer - Cannot execute a program csc.exe

Discussion in 'ASP .Net' started by =?Utf-8?B?QW5kcmV3RG90SGF5?=, Jun 13, 2004.

  1. 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()
    =?Utf-8?B?QW5kcmV3RG90SGF5?=, Jun 13, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?QW5kcmV3RG90SGF5?=

    Natty Gur Guest

    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!
    Natty Gur, Jun 13, 2004
    #2
    1. Advertising

  3. 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.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()
    >
    =?Utf-8?B?U2ltb25lIENoaWFyZXR0YQ==?=, Aug 4, 2004
    #3
  4. 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.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()
    >
    =?Utf-8?B?U2ltb25lIENoaWFyZXR0YQ==?=, Aug 4, 2004
    #4
  5. "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.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()
    >
    =?Utf-8?B?U2ltb25lIENoaWFyZXR0YQ==?=, Aug 4, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dgauchet

    Resources assemblys and csc.exe

    dgauchet, Jun 16, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    5,516
    dgauchet
    Jun 20, 2005
  2. khawar
    Replies:
    1
    Views:
    468
    AlexS
    Jul 15, 2003
  3. Cezar Nasui

    csc.exe error

    Cezar Nasui, Jun 23, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    6,768
    =?Utf-8?B?U2ltb25lIENoaWFyZXR0YQ==?=
    Aug 4, 2004
  4. mudge
    Replies:
    2
    Views:
    5,070
    mudge
    May 24, 2006
  5. Anupam Singh
    Replies:
    0
    Views:
    487
    Anupam Singh
    May 22, 2008
Loading...

Share This Page