Yesterday I was working with a customer on setting up a remote map from my machine to a VPN drive on a remote server on the VPN. Typically you can just map a drive or directly enter a UNC path to the server:
Typically that works just fine, but yesterday I noticed that it didn't work. Further, it failed immediately with:
Network path cannot be found
Now there can be a number of problems that can cause this - like a connection issue, adapter configuration etc. - but in this case the behavior was very different that what I'd seen before:
- The attempt to connect failed immediately (no checking on the network it seems)
- Even though I checked Use different credentials the Login dialog did never pop up to prompt for credentials
- Even trying to access drives on the local, internal network would fail
- Trying to use the Network discovery dialog to access resources listed all failed immediately
This was very frustrating because network connections for all internet protocols and messaging have been working just fine - it's just that all the Windows based network mapping/location features failed immediately.
I smelled a rat right away given the immediate error message without delay and the fact that there was no login dialog ever brought up.
The Problem: Network Provider Order
After a bit more research I ran into an obscure Technet Forums post that discusses a similar case. The resolution in there is that the Network Provider order causes this sort of problem - if the provider order does not include LanMan in the first entries it doesn't work.
Promptly I checked my machine's settings at:
what I found looked like this:
Notice the two empty entries in the order!
I changed the value to a more sane looking setting:
and that worked! Not sure what WebClient is but I didn't remove it - I suspect it's not required so don't add it if it wasn't there on your config in the first place.
Several other people have reported they've seen similar problems. Empty entries, LanmanWorkstations name truncated or mangled and even missing. Or other providers in front that are no longer installed.
The forum post mentions that other providers might sit in front of LanManWorkStation which is the provider responsible for managing network connections. To fix this I removed the two empty entries and moved LanmanWorkStation to the front of the list and low and behold I get my login dialog back and was able to connect to the remote machine.
Not sure how this got munged, but I suspect custom VPN clients have something to do with this. Over the last few months I've had to install several different VPN clients to connect to customer's private VPN networks - installing and uninstalling the clients and I suspect somewhere in that process the provider entry in the registry got munged.
Provider Order Dialog
Thanks to Richard (in comments) I found out that you can also change the provider order interactively, although it takes some digging to get into the Provider Order dialog in Windows. To get to this dialog to to:
Network and Sharing Center | Adapter Settings | Tools Menu | Advanced | Advanced Settings | Provider Order
Yup it's buried. Here's what you get:
After playing around with this it looks like this dialog also affects the registry settings and it did manage to remove my empty entries when I made a change. Note that you do have to make a change though for this to work.
I hate shit like this! Clearly some application (which probably was uninstalled since) modified this setting, but nevertheless this is troublesome. Further the Windows 8 troubleshooting applet was a complete loss, going straight into 'Do you have permissions?' - of course not since I was never prompted :-) If you don't know what the problem it's hard to come up with the solution - I was lucky to find that forum post earlier that pointed me in the right direction. Hopefully this blog entry with a more explicit title will be a little easier to find.
Incidentally I think this has been a problem for a real long time of me being unable to map drives to servers - specifically my own Web Server. It hasn't been an issue since it's so rare that I ever need to do this, but yesterday we needed to quickly push some files up to a server that otherwise wasn't connected.
Hopefully this post will be useful to somebody who runs into the same problem.
I'll be at DevIntersection in Vegas this fall giving sessions on ASP.NET Core with Angular and Localization. Thinking of coming? Use discount code STRAHL and save a few bucks. If you do be sure to stop by and say hello!
Other Posts you might also like