| Previous | Next |
| ERROR_NOT_AUTHENTICATED | ERROR_CONTINUE |
ERROR_NOT_LOGGED_ON
The caller is not logged on to the network service.
ERROR_NOT_LOGGED_ON is Win32 error 1245 (0x4DD). It usually means that an operation depends on a network logon session or provider connection that has not been established, has expired, or is not visible in the caller’s current security context. The message also mentions that the specified service does not exist, so the service or provider identity must be checked alongside the user session.
Why desktop success can be misleading
A user being signed in to Windows does not prove that every process owns credentials for every remote service. Scheduled tasks, services, elevated processes, different logon sessions, and impersonated threads can have separate credential availability. Mapped drives are also scoped to logon sessions and should not be used as the sole proof of network authentication.
What to capture
- the local process account, logon session, integrity level, and impersonated identity
- the remote server, share or service name, and network provider selected
- whether explicit credentials, current credentials, or a saved connection were expected
- the sequence of connect, authenticate, disconnect, and operation events
- any earlier provider-specific status that was converted to 1245
Diagnostic procedure
Verify that the remote service exists and is reachable, then establish whether the process has a valid network security context. For an explicit connection, inspect the result of WNetAddConnection2 or the application’s SSPI exchange. For a service, check its logon account and whether the protocol supports the intended delegation path. Do not test only from an administrator’s interactive command prompt because that uses a different session.
Look for connection cleanup that runs too early. A component can successfully authenticate, queue asynchronous work, and then release the provider connection before the worker accesses the resource. Correlation IDs should tie the resource operation to the exact session that authenticated it.
Recovery
Create or refresh the network logon in the same security context that will perform the operation. If credentials are no longer valid, prompt through an approved credential flow or fail clearly for unattended workloads. Repeatedly reconnecting with an unknown identity can trigger account lockouts and obscure the missing-session defect.
Comparison
ERROR_NOT_AUTHENTICATED is broader and can describe any missing authenticated context. ERROR_LOGON_FAILURE indicates rejected credentials. Error 1245 emphasizes that the network logon or named service required by this operation is absent.
Example
A Windows service tries to open a path through a drive letter mapped by an interactive administrator. The service has no mapping or network logon in its own session and receives 1245. Using a UNC path and authenticating under the service account fixes the design instead of duplicating the user’s drive mapping.
References
- Microsoft: System Error Codes (1000–1299)
- Microsoft: Noninteractive Authentication
- Microsoft: WNetAddConnection2W function
- Microsoft: About Service Logon Accounts
Looking for a different code? Search another status or error code.