By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,515 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.

CodeDom Security / Permissions issues

P: n/a
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.FromSourceBat ch(CompilerParameters
options, String[] sources) at
System.CodeDom.Compiler.CodeCompiler.FromSource(Co mpilerParameters
options, String source) at
System.CodeDom.Compiler.CodeCompiler.System.CodeDo m.Compiler.ICodeCompiler.CompileAssemblyFromSource (CompilerParameters
options, String source) at
Inginix.Deployment.Business.DataConditionDefinitio n.Compile()
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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

--
Duedel
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Feb 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.