Solved

Restoring Disconnected Network Drive via VB.NET

Posted on 2008-10-22
2
436 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 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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

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 outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

707 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