Print Page | Close Window

Trace File Logging and File I/O Permissions

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=72
Printed Date: 26-Apr-2024 at 12:10am


Topic: Trace File Logging and File I/O Permissions
Posted By: Customer
Subject: Trace File Logging and File I/O Permissions
Date Posted: 06-Jun-2007 at 3:58pm

Question:

I ran into an interesting problem with using DevForce on a web site, wanted to see if you’d seen it and addressed it.

The site I’m trying to publish to has only medium trust level, and the logging system in tracefns apparently is trying to get file IO access, which is being denied. However, regular file read/write seems to work OK from my code. Is the logging something that can be turned off, or is there a way to change what permissions are being requested?

Is this something you’ve seen, or is the assumption that the app will be running with full trust?




Replies:
Posted By: IdeaBlade
Date Posted: 06-Jun-2007 at 3:59pm

Answer:

Are you running the Persistence Service under IIS with WinForms clients, or is this an ASP.NET application?

DevForce applications, if using remoting, do require full trust; so the server always needs full trust.  Two-tier applications, including ASP.NET applications, can run with reduced privileges.

Trace file logging can be turned off by leaving the file name out of the .ibconfig file, like this: <logFile></logFile>.  The directory the log file is written to is determined by the location of the .ibconfig file if you haven’t provided the full path in the <logFile> element.  This means that if your .ibconfig file was found embedded in the AppHelper assembly then by default the log file will be written to that directory too.  Under IIS this is a little trickier, since the final compiled assembly in the Temporary ASP.NET files directory is used.  There’s some info in the Developer’s Guide about IIS deployments – including how to specify a log file directory and locate the .ibconfig – which may help.





Print Page | Close Window