Solved

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

Posted on 2011-02-17
12
4,224 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:GreenLeafPros
Comment Utility
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
Comment Utility
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
Comment Utility
Just a wild thought here: what if you use the FQDN for the server when setting up the mappings?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 14

Expert Comment

by:Don Thomson
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

So many times I have seen the words written in a question "if only I could show you" or " I know how hard it is for you since you can't see it" in any zone. That has inspired me to write about this tool in windows 7 called "Problem Steps Recorder…
Secure VPN Connection terminated locally by the Client.  Reason 442: Failed to enable Virtual Adapter. If you receive this error on Windows 8 or Windows 8.1 while trying to connect with the Cisco VPN Client then the solution is a simple registry f…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now