Windows Service – access to network resources – what to consider?
Our document conversion tools – FileConverter, AutoOCR and FileConverterPro – are used to monitor one or more input folders and to automatically start processing for new documents. This can be done either via local drives or via network resources.
Particularly when installing the applications as a service and when using network resource, some things have to be considered with regard to the correct configuration:
- The service that has access to network resources must run under a user account and not as a system account.
- The user at which the service runs must have the appropriate rights (read / write / delete) on the network resource.
- You must not use a mapped drive to access the network resources (in / out / error / archive / log folder), but the direct network Share (UNC path) must be used.
- The processing option for folder monitoring must be changed from “File System Events” to “Read File Blocks“.
The network connection to a drive letter is managed via the “Network Connection Service”. Mapping a drive so there are some things you should know
- Option – Reconnect at the logon – Used to automatically restore the drive mapping at the next login.
- The mapping of the drives is implemented via users – if the user is not logged in, the mapped drives are not available.
- Mapped drives are not available via a service – regardless of whether the user is running the same account as the user currently logged in – because a service runs only under the “user credentials”, but is not logged in.
In general – even if the applications are not installed and operated as a service – it is recommended to use network shares (UNC paths) instead of mapped drives. A network share – the direct access to the network resource – is always available for the service (under a user account) as well as for normal applications and is defined by the remote server. However, this does not apply to the local system account – it does not have access to network resources and therefore can not be used for a service that must have access to network resources.