IAudit |
Note: The current implementation of this method should only be used in sever scripts.
void ExportAuditTrailEntriesToCsvFile( string fileName, DateTime? startTimeUtc, DateTime? endTimeUtc )
| Exception | Condition |
|---|---|
| SdkException |
Thrown in case of any errors occurred during export process. For example: - Export target directory is not whitelisted. - Method executed in client script or in a external SDK application. |
| AuditTrailExportSdkException |
Thrown in case of export failure. Contains property of enum type AuditTrailFaultCode; the value of this property indicates the reason for the failure. |
This method will write all Audit Trail entries to the CSV file starting from startTimeUtc until endTimeUtc if value provided.
If more than one million logbook entries match the specified search criteria then the method creates several CSV files, each containing at most one million entries. (The reason for this is that Microsoft Excel(TM) 2007 and 2010 cannot import CSV files with more than 1.048.576 rows.) The names of the additional CSV files are constructed by appending an ordinal number to the specified file name.
|
The method uses "accept known good" input validation strategy and ensures that requested fileName is strictly within
a configured whitelist where exports are allowed.
Requested export path must meet one of the following condition: - Specified path directory is white-listed itself; - Specified path directory is subdirectory of any white-listed directory; - Specified path is within an optical disc device, such as a CD or DVD-ROM or within removable storage device, such as a floppy disk drive or a USB drive; When none of the conditions above are met, requested export is rejected. |
| Exports whitelist is defined by BVMS administrator on Central Server in ..\ProgramData\Bosch\VMS\ServerData\PathWhitelistForExports.txt. |