Permission to Temp
Hi
I use FastReport .Net. I have small problem with generate report on my computer. I don't have access to temp folder suppose.
Log:
w Microsoft.Win32.NativeMethods.CreateDirectory(String path, SafeLocalMemHandle acl)\ w System.CodeDom.Compiler.TempFileCollection.CreateTempDirectoryWithAce(String directory, String identity)
w System.CodeDom.Compiler.TempFileCollection.GetTempFileName(String tempDir)
w System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
w System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
w System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension)
w Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
w Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
w System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
w FastReport.Code.AssemblyDescriptor.InternalCompile()
w FastReport.Code.AssemblyDescriptor.Compile()
w FastReport.Report.Compile()
w FastReport.Report.Prepare(Boolean append)
w FastReport.Report.Prepare()
w FastReport.Report.Show(Boolean modal, IWin32Window owner)
Where is create Temp folder? How resolve this problem?
Comments
// sometimes the system temp folder is not accessible...
if (Config.TempFolder != null)
cp.TempFiles = new TempFileCollection(Config.TempFolder, false);
Thanks for replay.
What 'cp' is?
Hello!
Set a real, writable folder for the user/process in the TEMP and TMP environment variables (Modify / Full Control permissions).
Also, before running reports, you can set the cache working directory in FastReport.Utils.Config.TempFolder by specifying a folder within the profile or application that has guaranteed write permissions (or simplify the report by avoiding dynamic compilation of complex expressions or scripts).