CodeDom Security/Permission Issues

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

From: Troy (Troy_at_discussions.microsoft.com)
Date: 09/03/04


Date: Fri, 3 Sep 2004 12:03:02 -0700

Hello,

We have an application that uses CodeDom for dynamic in-memory complation 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 priveledges. I have
also set it to run under the local Administrator account and various others,
to no avail.

If anyone has experienced this problem and/or knows a resolution, I would
really appreaciate 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 / Permissions issues
    ... ASP.net web site and a Windows Service. ... I realize that CodeDom has to create temporary files even when doing ... Boolean useAsync, String msgPath, Boolean bFromProxy)at ... options, String source) at ...
    (microsoft.public.dotnet.framework.aspnet)
  • 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)