| Previous | Next |
| ERROR_NO_NET_OR_BAD_PATH | ERROR_CANNOT_OPEN_PROFILE |
ERROR_BAD_PROVIDER
WNetGetNetworkInformation returns ERROR_BAD_PROVIDER when its provider-name argument does not match a running network provider. WNetAddConnection2 also allows a caller to force a specific lpProvider; when that field is NULL, Windows can determine the provider from the remote name instead.
Provider names are not protocol aliases or arbitrary labels. Hard-coding a display string from another machine or an uninstalled redirector can force the request down a nonexistent provider path. Applications that do not require a specific provider should generally allow provider selection from the resource name.
Provider validation
- Log lpProvider exactly and determine where that value was obtained.
- Enumerate current network resources/providers instead of copying a provider name from configuration blindly.
- Check that the provider service/component is installed and running.
- Compare behavior with lpProvider unset when provider-specific routing is not required.
WNetGetNetworkInformation · WNetGetResourceInformation · Windows MUP and UNC prefix resolution
Looking for a different code? Search another status or error code.