| Previous | Next |
| ERROR_BAD_PROVIDER | ERROR_BAD_PROFILE |
ERROR_CANNOT_OPEN_PROFILE
Persistent WNet mappings are tied to the user profile. WNetAddConnection2 documents this result when the system cannot open the profile while processing persistent connections. This is different from the remote share rejecting authentication: the failure occurs while Windows is handling local remembered-connection state.
Investigate the caller identity and profile availability. Services, scheduled tasks, impersonated threads, and users with temporary or unavailable profiles can have a different connection-profile context from an interactive desktop session. Testing the same UNC path interactively does not prove that the failing process can open the profile it needs.
Profile-context checks
- Record the security identity and logon session of the process making the WNet call.
- Determine whether a normal, temporary, or unavailable user profile is loaded.
- Test a nonpersistent/deviceless connection separately from CONNECT_UPDATE_PROFILE behavior.
- Do not reset the network password unless authentication was actually attempted and failed.
WNetAddConnection2 · Windows network redirector architecture
Looking for a different code? Search another status or error code.