CodeDom Security / Permissions issues

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Livermore (john.livermore_at_nospm-inginix.com)
Date: 09/07/04


Date: Tue, 07 Sep 2004 14:40:51 -0500

Hello,

We have an application that uses CodeDom for dynamic in-memory
compilation of code. The same code (library) is used by both an
ASP.net web site and a Windows Service. The code runs fine in the web
environment, but I get file IO errors related to temporary files when
it is run in by the Service.

I realize that CodeDom has to create temporary files even when doing
in-memory compilation. However, by default, the service runs using
the local system account. So I would think it has the necessary
privileges. I have also set it to run under the local Administrator
account and various others, to no avail.

This problem only occurs in Windows Server 2003.

If anyone has experienced this problem and/or knows a resolution, I
would really appreciate the help. An example error description is
copied below.

Thanks,

Troy

Message = System.IO.FileNotFoundException: Could not find file
"C:\WINDOWS\TEMP\0vseyis4.dll". File name:
"C:\WINDOWS\TEMP\0vseyis4.dll" at System.IO.__Error.WinIOError(Int32
errorCode, String str) at System.IO.FileStream..ctor(String path,
FileMode mode, FileAccess access, FileShare share, Int32 bufferSize,
Boolean useAsync, String msgPath, Boolean bFromProxy)at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share) 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
Inginix.Deployment.Business.DataConditionDefinition.Compile()



Relevant Pages

  • CodeDom Security/Permission Issues
    ... The same code is used by both an ASP.net web site and a ... I realize that CodeDom has to create temporary files even when doing ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ... options, String source) ...
    (microsoft.public.dotnet.framework)
  • Re: Data from web site
    ... You can then parse out the info from the returned string. ... Dim objShell As Object, objShellWindows As Object, o As Object ... >> I am trying to get some data from a web site. ...
    (microsoft.public.excel.programming)
  • Re: How to get user id guid
    ... string PrintName ... int nSize = translatedName.Capacity; ... My web site is using Integrated Windows authentication with Digest ...
    (microsoft.public.dotnet.security)
  • RE: Conflicts with multiple picture library webpart on the same page
    ... except the first one the "Thumbnail" column of the rest of the pic lib ... the page to return to your Web site. ... Exception Details: System.Runtime.InteropServices.COMException: Item does ... bstrUrl, String bstrListName, String bstrHtmlFormName, Int32 lFormType, ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Long MsgBox -- need to display in 2 paragraphs
    ... I need to do a search of a string inside the value of a database... ... MsgBox Err.Description ... Word MVP web site http://word.mvps.org ...
    (microsoft.public.word.vba.general)