MainBoss Basic running on Citrix server caused error trying to write to temp file
This problem has been observed in the following situation.
The Citrix Server is a NT machine called A. MainBoss 2.8 Update 4 is installed on this machine (i.e. the MainBoss executable sits here). Full access and permissions are given to all users to read and write to any directory or file on this server.
The MainBoss database files were placed on a machine outside of the Citrix environment, which is called B and is also a NT machine. The Plant sample was used for the database files.
The Citrix client software executed MainBoss from one of the Citrix clients, machine X, which is a Windows 2000 machine. MainBoss started without any problems, but when the user tried to do Inventory->Browse Receipts->Edit a Receipt->Add item an error message appeared:
Creating file Status -20 90058 Temp directory W:\temp\d\rciqjwyb.dbf System cannot find file specified
Checking the Help->About confirmed that the database location was actually B:\MainBoss\Plant. The W:\ from the error message referred to the C drive of machine A (the Citrix server). When the user was asked to open Windows Explorer and locate the W drive, he was unable to do so.
It turns out that the W drive is hidden from users in the Citrix configuration, so that they cannot gain direct access to the Citrix server's C drive. Since the drive is hidden, MainBoss also cannot locate that drive and therefore cannot access the needed temp file.
Specific Cause: MainBoss uses the Windows API GetTempPath to determine where temporary files can be created. The value returned by this call must be both visible and accessible to MainBoss.
Possible solutions:
- Make the W drive visible to users and therefore MainBoss. However this may not be an option if the drive contains other sensitive files and you don't want users to have access to the server directly.
- By default, the location of the GetTempPath is the W drive (i.e. the C drive of the Citrix server). The Citrix administrator can change the default settings to specify another location as the destination of temp files, which is visible to MainBoss.