CodeDom Security / Permissions issues

J

John Livermore

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()
 
D

Duedel

Sorry to bring this back on top but i've the same problem. Any hel
would be appreciated


-
Duede
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top