Table A-2 shows the required EventLogPermission settings for the PBTraceTarget global property for .NET targets. You can set this property on the Configuration tab of the Project painter for Web Forms and Web Service targets. For Windows Forms targets, you must set this after deployment in the appname.exe.config file (where appname is the name of the executable file).
Global .NET property |
Permission required |
---|---|
PBTraceTarget when the value is set to file
|
Windows Forms: Pbtrace.log FileIO permission asserted by default in runtime library Web Forms: appname_root\log\pbtrace.log FileIO permissions added by default when property set in IDE |
PBTraceTarget when the value is set to EventLog |
Administer |
In Windows and Web Forms targets, if PBTraceTarget is set to "EventLog", the application needs EventLog Administer permission to write to the log. You can set this in Security tab for a as follows:
<IPermission class=" EventLogPermission" version="1"> <Machine name="testmachine" access="Administer"/> </IPermission>