Skip to main content
Version: 8.1

Mapping a Network Drive

Windows makes it possible to map drives on network servers to local drive letters so they can be accessed by users as if they were a local drive. The problem, however, is that Windows is not very consistent about how it handles such mapped drives when accessed from a Windows Service, such as the Ignition Gateway. When the service is started manually, the drives will be available, but when the system is rebooted, the service will no longer be able to access them. There may be users that wish to read or write data in Ignition using shared drives, and don't want to manually set up shared drives each time.

info

Must be using at least Ignition version 7.5+ and Java Service Wrapper 3.5.4

To make shared drives available to Ignition on startup, place the following lines in the ignition.conf file, which is located in the data folder of the main Ignition installation folder (usually C:\Program Files\Inductive Automation\Ignition\data for Windows users):

//Note that target "Z:" is the drive letter assigned to the mapped drive.

wrapper.share.1.location=\\fileserver\folder
wrapper.share.1.target=Z:
wrapper.share.1.type=DISK

Then Stop the Gateway and Start the Gateway. Restarting does not enable this functionality.

Change the appropriate data for location and target to match the computer's actual setup. If your shared drives require authentication, add the following lines, filling in the appropriate data for user, domain, and password:

wrapper.ntservice.account=user
wrapper.ntservice.password=password
wrapper.share.1.account=domain\user
wrapper.share.1.password=password

To turn on debugging to see what is causing network share connection issues, make sure to enable wrapper.debug = TRUE by removing the pound (#) sign in front of that line of code. The location of the log file is in the main Ignition installation folder as wrapper.log.

note

Remember, the Gateway must be stopped then started to get the changes to the ignition.conf file to take effect. Restarting the Gateway will not work.

Notes​

Un-map drive on shutdown
wrapper.share.1.shutdown.unmap=TRUE
How often to retry server connection:
wrapper.share.1.startup.max_retries=2
What interval (seconds) between retries:
wrapper.share.1.startup.retry_interval=10
Set wrapper to fail to startup if network share not found:
wrapper.share.1.startup.failure=SHUTDOWN

Troubleshooting​

Here are a couple of the common problems that are encountered when mapping network shares:

Server not found​

The debug output will show something like this if a drive can't be reached:

wrapper | Attempting to map the "\\fileserver\folder" share to "S:"...
wrapper | Unable to map "S:". Attempt #1 (The network name cannot be found. (0x43))
wrapper | Attempting to map the "\\fileserver\folder" share to "S:"...
wrapper | Unable to map "S:". Trying to continue. (The network name cannot be found. (0x43))

Incorrect Login Data​

If the configured account or password are incorrect (or are missing) then the mapping will fail with a message like the following:

wrapper | Attempting to map the "\\myfileserver\commonshare" share to "S:"...
wrapper | Unable to map "S:". Trying to continue. (Access is denied. (0x5))