Solved

Restoring Disconnected Network Drive via VB.NET

Posted on 2008-10-22
2
431 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

10 Experts available now in Live!

Get 1:1 Help Now