Solved

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

Posted on 2011-02-17
12
4,286 Views
Last Modified: 2012-06-27
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
Comment
Question by:GreenLeafPros
  • 5
  • 2
  • 2
  • +2
12 Comments
 
LVL 35

Expert Comment

by:Ernie Beek
ID: 34915707
It looks there is some issue with DNS or wins. Is the PPTP connection also getting dns/wins settings when dialing in?
0
 
LVL 14

Expert Comment

by:Don Thomson
ID: 34915732
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
 
LVL 12

Expert Comment

by:mattclarified
ID: 34915807
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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:GreenLeafPros
ID: 34915865
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
 

Author Comment

by:GreenLeafPros
ID: 34915952
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
 
LVL 35

Accepted Solution

by:
Ernie Beek earned 250 total points
ID: 34916061
Just a wild thought here: what if you use the FQDN for the server when setting up the mappings?
0
 
LVL 14

Expert Comment

by:Don Thomson
ID: 34916205
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
 

Author Comment

by:GreenLeafPros
ID: 34916580
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
 

Expert Comment

by:Shadowmage
ID: 34917497
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
 

Author Comment

by:GreenLeafPros
ID: 34948166
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
 
LVL 12

Expert Comment

by:mattclarified
ID: 34949634
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
 

Author Comment

by:GreenLeafPros
ID: 34951346
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet Explorer 11.0 fails to open 34 86
Windows Updates 14 70
Applying Computer Settings 12 93
Domain User is unable to see any drives in her "My Computer" 9 50
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question