Network & UNC Troubleshooting
This page covers common network share errors encountered when using UNC paths for exports and imports. AppProfileSafe connects to shares using the Win32 WNet API (WNetAddConnection2), so error messages include Win32 error codes that map to specific network issues.
Common Error Codes
| Error | Code | Message | Cause & Resolution |
|---|---|---|---|
| 5 | ERROR_ACCESS_DENIED | Access denied | The account does not have permission to the share. Verify both share permissions and NTFS permissions. Ensure the service account is listed with at least Change (for export) or Read (for import) access. |
| 53 | ERROR_BAD_NETPATH | Network path not found | The server name cannot be resolved or is unreachable. Check DNS resolution (nslookup servername), verify the server is online (ping servername), and ensure the SMB port (TCP 445) is not blocked by a firewall. |
| 67 | ERROR_BAD_NET_NAME | Network name cannot be found | The server is reachable but the share name does not exist. Verify the share name and that the share is published. Use net view \\server to list available shares. |
| 86 | ERROR_INVALID_PASSWORD | Invalid password | The password is incorrect. Verify the password is correct and the account is not locked out. For --unc-credential-store, update the stored credential with cmdkey /add:\\server\share /user:DOMAIN\user /pass:newpassword. |
| 1219 | ERROR_SESSION_CREDENTIAL_CONFLICT | Session credential conflict | A different user is already connected to the same share in this Windows session. AppProfileSafe handles this automatically by disconnecting the existing session and reconnecting. If it persists, manually disconnect with net use \\server\share /delete. |
| 1326 | ERROR_LOGON_FAILURE | Login failure | Bad username or password. Verify the username format (DOMAIN\User or user@domain) and password. Check that the account exists and is not disabled. |
| 1331 | ERROR_ACCOUNT_DISABLED | Account is disabled | The service account is disabled in Active Directory. Re-enable the account or use a different credential. |
Troubleshooting Checklist
- Verify connectivity —
ping servernameandTest-NetConnection servername -Port 445. - Verify share exists —
net view \\serverlists available shares. - Verify permissions —
net use \\server\sharefrom the service account to test access interactively. - Check credentials —
cmdkey /listto verify stored credentials for the target share. - Check existing connections —
net uselists active connections. Disconnect conflicting ones withnet use \\server\share /delete. - Check app.csv — The application log records the full WNet error code and message for every connection attempt.
- Firewall — Ensure TCP port 445 (SMB) is open between the client and the file server.
- SMB version — Verify that both client and server support the same SMB protocol version. Some servers disable SMBv1 for security, which is correct but requires SMBv2+ support on the client.
Credential Manager Issues
When using --unc-credential-store:
- "No credentials found" — Credentials must be stored under the same Windows user account that runs the CLI. If the scheduled task runs as
SYSTEM, store credentials under the SYSTEM account (or switch to a service account). - Wrong credentials used — Windows Credential Manager matches by target name. Verify the target with
cmdkey /listand ensure it matches the share root extracted from the manifest path. - Expired password — If the service account password was changed, update the stored credential with
cmdkey /add:.