• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4388
  • Last Modified:

Can't Access Mapped Drives in Windows 7 following VPN Disconnect

I'm running Windows 7 Pro 64-bit in a single-server Windows 2003 AD environment and have an annoying drive-mapping problem.  I have three drives mapped to the server by name, e.g. \\server\folder.  I often have to VPN into another network via PPTP, and about 50% of the time following diconnecting properly from the VPN, I can no longer access my mapped drives.  I get the error. "G:\ is not accessible.  An unexpected network error occurred."

If I go to the Run line and type \\server\folder, I can connect fine, though I still can't access the folder by drive letter.  If I disconnect the mapped drive and attempt to remap it, it fails with the "An unexpected network error occurred" message, even if I have the folder open from the run line.

There are no errors in the PC or server Event Viewer that I can find.  The only fix I have is to either log off and back on, reboot, or -- and perhaps this is a clue -- remap the drives by IP address, e.g. \\192.168.10.5\folder.  Because the latter is a workaround, this is not an overly pressing issue, however, I would like to get it resolved.

Thanks in advance.
0
GreenLeafPros
Asked:
GreenLeafPros
  • 5
  • 2
  • 2
  • +2
1 Solution
 
Ernie BeekCommented:
It looks there is some issue with DNS or wins. Is the PPTP connection also getting dns/wins settings when dialing in?
0
 
Don ThomsonCommented:
I had a similar problem - The workstations required a reboot every morning to get the server drives mapped back in.

In the end it turned out that the power down to save energy on the server Nic was turned on - Every time it turned off - the workstation lost the trust of the server. Both ends should have that feature turned off.

You may also want to try doing the following - open a cmd prompt

type
net use x: /DELETE
net use x: \\server\folder /PERSISTENT:YES

If that works and you get the drive connection back then try your VPN connection - Disconnect and see if the drive is still accessible. If it isn't then create a batch file deleting then creating your drives

If that works you may be able to modify the batch file to include the VPN command in the first line - with some kind of a loop to recognize when the program is terminated then do your reconnections

0
 
mattclarifiedCommented:
Try this on your VPN connection

At the connect to windows click properties.
Choose the Networking Tab and then highlight Internet Protocol (TCP/IP) and click properties.
Next click Advanced.
And now de-select “Use default gateway on remote network”.

M@
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
GreenLeafProsAuthor Commented:
erniebeek: PC is getting DNS through the VPN connection.  I was thinking the same thing as you, that I wasn't getting my DNS back properly after a disconnect.  However, that wouldn't explain the fact that I can type the path in at the Run line and connect with no problem.

DTHConsulting: I don't think this is a NIC issue because A) I never had the problem in the past with Vista (believe it or not), B) this issue can happen after being VPN'ed in for 30 seconds and C) I can still connect fine through other means.

Your idea of remapping using NET USE seems to work.  While this may be a workaround -- and I'll use it for now -- it still doesn't fix the actual problem.  While I can embrace the batch file, it should not be required.

And a new wrinkle... If my G: drive is mapped and then fails, I can disconnect the G: drive through the drive mapping GUI, but am unable to remap it by name.  HOWEVER, I can map it by name fine to an unused drive letter.
0
 
GreenLeafProsAuthor Commented:
mattclarified: Unchecking "Use default gateway on remote network" causes too many other issues.  When I do that, I can no longer ping objects on the remote network by name.  Also, the remote network is connected by a branch office VPN to another network, and I can't reach machines on that network at all, even by IP.
0
 
Ernie BeekCommented:
Just a wild thought here: what if you use the FQDN for the server when setting up the mappings?
0
 
Don ThomsonCommented:
If you have used the NET USE  command using /persistent:yes
and you disconnect using the Gui - Then that drive will not really be available to be remapped until you use the NET USE g: /delete   if I'm not mistaken
0
 
GreenLeafProsAuthor Commented:
First, thanks for all the input.  It's appreciated.  Because this problem is more on the random side, I'll need some time to test the various ideas.  What I've done is:

Mapped drive X: through the GUI to \\server\folder1
Mapped drive Y: through the GUI to \\server.domain.local\folder2
Mapped drive Z: using NET USE  Z: \\server\folder3 /PERSISTENT:YES

I'm typically in and out of the VPN on a daily basis.  I'll get back to eveyone by Monday or as soon as I see a result one way or another.
0
 
ShadowmageCommented:
If you have to use the VPN on a regular basis, I would recommend installing Microsoft Virtual PC or VMWare to create a virtual PC to use for the VPN use.  You can use the virtual PC for the VPN tasks and not need to worry about disconnecting from the network drives.
0
 
GreenLeafProsAuthor Commented:
Unfortunately, I've been out of the office a lot and haven't been able to do too much testing.  I'll try some more in the morning and get back to you.
0
 
mattclarifiedCommented:
Hi,

Have you tried mapping your drives by IP address rather than server name?  This might work as a quick fix to the problem.

M@
0
 
GreenLeafProsAuthor Commented:
OK, the results are in for now.  I haven't been able to recreate the problem exactly, but I can tell you the following:

After rebooting my machine at some point, the drive I mapped using NET USE no longer worked.  The mapping was there, but it gave me a credentials error for some reason, and I had to remap it.  I'd only ever been logged in with one account.

While VPNed in at one point, I went to my drive mappings and seriously watched them all, one at a time, disappear -- except for the drive mapped with the FQDN, which worked fine.  Incidentally, the ones that disappeared had red X's before doing so, and after I ended my VPN session, they all returned and worked.

So, even though I'm not 100% sure this is fixed, I can say that in the past I could never access my local drives by name (using Win 7) while VPNed in until I used the FQDN mapping, so I feel the need to award my points to erniebeek, as this seems to be the best solution.

And lastly, to mattclarified, using the IP address has always worked, as I believe I mentioned in my original post.  The goal was to get the mappings to work by name following a VPN connection, which had always worked in XP and Vista in this environment, but which were not working ionsistently with WIn7.

Thanks to all for your input.  It has been greatly appreciated.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now