Solved

Restoring Disconnected Network Drive via VB.NET

Posted on 2008-10-22
2
434 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
2 Comments
 
LVL 8

Accepted Solution

by:
ccpjc earned 250 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 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