?
Solved

Restoring Disconnected Network Drive via VB.NET

Posted on 2008-10-22
2
Medium Priority
?
440 Views
Last Modified: 2013-11-07
I have a VB.NET (.NET Framework 2.0) program launching every minute on a Windows 2003 server and processing files from a remote server.  It accesses the files via UNC (e.g, \\SERVER22\\exports\rcv or \\149.44.76.2\exports\rcv).  The program launches fine for days but then gets "stuck".  When I log in to the server I always find the equivalent mapped network drive to be "disconnected".  Killing the app's process and executing the app manually confirms it can't access the UNC resource (it just hangs).  I have to double click the mapped drive in Explorer to reconnect the drive and then launch the app.  This might be acceptable if it happened once a month but the problem occurs in bunches.  The last two weeks were fine but I've now had three network drive disconnections in the last 24 hours.

How can the app ensure the UNC resource is available and if it isn't, do the necessary reconnection?
0
Comment
Question by:AdvizeIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
ccpjc earned 1000 total points
ID: 22778953
I have the same issue on one of the computers here at the office
i made a bat file that re maps the drive and a scheduled task to check every 10 minutes
0
 

Author Comment

by:AdvizeIT
ID: 22779364
Thanks.  I've added a NET USE before the app kicks off and a NET USE DELETE after it completes.  If it works for the next 24 hours, I'll award the points.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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