JIT compilation failure with impersonation

From: TBALKAN (TBALKAN_at_discussions.microsoft.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 14:09:02 -0800

We have two machines. Machine1 is the web server and Machine2 is the 'file
server'. The goal is to read and write files from Machine2 using the
aspnet_wp.exe process which is running under ASPNET credentials on Machine1.
In order to do that we added the identity element into the web.config and
provided a domain-level account to use for impersonation. That account has
Modify permissions on the folder in which it is trying to read the file from
on Machine2. When the transaction is finished (which involves accessing the
remote resource on Machine2), and the user tries to open a web page that was
not previously JIT compiled, we get the following error:
Exception Type: System.Web.HttpException
Exception:
An unhandled exception occurred during compilation using the CodeDomProvider
'Microsoft.VisualBasic.VBCodeProvider'. Please review the stack trace for
more information about the error and where it originated in the code.
StackTrace:
at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean
fCreateIfNotFound) at System.Web.UI.TemplateParser.GetParserCacheItem() at
System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath,
String inputFile, HttpContext context) at
System.Web.UI.UserControlParser.GetCompiledUserControlType(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.TemplateControl.LoadControl(String virtualPath) at
E3Container.E3WebPartWindowUC.LoadWebPart(String strInitData, IE3Container
pE3Container)
TargetSite: System.Web.UI.TemplateParser.GetParserCacheItemInternal
Parameters:
- System.Boolean fCreateIfNotFound

::InnerException::
Exception Type: System.Web.HttpUnhandledException
Exception:
An unhandled exception occurred during compilation using the CodeDomProvider
'Microsoft.VisualBasic.VBCodeProvider'. Please review the stack trace for
more information about the error and where it originated in the code.
StackTrace:
at System.Web.Compilation.BaseCompiler.GetCompiledType() at
System.Web.UI.UserControlParser.CompileIntoType() at
System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()
TargetSite: System.Web.Compilation.BaseCompiler.GetCompiledType

::InnerException::
Exception Type: System.Runtime.InteropServices.ExternalException
Exception:
Cannot execute a program. The command being executed was
"c:\winnt\microsoft.net\framework\v1.1.4322\vbc.exe"
@"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\e3container\b879c699\68436b67\o-5s2ovn.cmdline".
StackTrace:
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.FromDomBatch(CompilerParameters options,
CodeCompileUnit[] ea) at
System.CodeDom.Compiler.CodeCompiler.FromDom(CompilerParameters options,
CodeCompileUnit e) at
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDom(CompilerParameters
options, CodeCompileUnit e) at
System.Web.Compilation.BaseCompiler.GetCompiledType()
TargetSite:
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated
Parameters:
- System.IntPtr userToken
- System.String cmd
- System.String currentDir
- System.CodeDom.Compiler.TempFileCollection tempFiles
- System.String& outputName
- System.String& errorName
- System.String trueCmdLine

We have checked permission for all temp folders (Framework, Winnt, etc.)
where the JIT compilation might occur.

Thanks,
Tony



Relevant Pages

  • Re: how to replace a substring in a string using C?
    ... Well spotted - no one else caught that one (I only picked it up after Dave ... strlen on the entire original string where possible - I posted a similar ... are some typical results (using the same compilation options as you except ... The optimisation of not calling strlen on the entire string cuts about 7% ...
    (comp.lang.c)
  • Re: Performance RPG Figurative Constants versus Literals
    ... in compilation times between the two methods, ... I would suspect that the compiler would store *blanks as a single byte ... I would also suspect that comparing ... a 132 character string to a figurative constant would be quicker in the ...
    (comp.sys.ibm.as400.misc)
  • Re: STRING length
    ... Actually please disregard the previous post, I found I needed to with ... comment the call out compilation is successful. ... '#including', or, 'withing' rather unbounded string. ...
    (comp.lang.ada)
  • Re: what is different between <fstream.h> and <fstream>MS VC++
    ... i am writting 2 programs in VC++ 6.0, one for XML files the header is ... recover from previous error; stopping compilation ... // PutString -- Put a string value into the DynamicTable ... String GetString (String Key); ...
    (comp.lang.cpp)
  • Re: Debug TRACE style output wihout leaving literal strings in binary
    ... implementation of TRACE type macros) does not meet my requirements. ... >> debug strings from binaries at runtime, but, to do so without any ... >> after compilation, but will be transparent to compilation. ... >> message ids and string tables instead of directly using string literals. ...
    (microsoft.public.vc.debugger)