【发布时间】:2011-05-01 22:54:41
【问题描述】:
我有一个为我的公司编写的 VB .NET 应用程序,它偶尔会抛出一条消息“System.IO.IOException:发生了意外的网络错误。”,我一直无法找出问题所在。
该应用程序是一个备份程序,为了简化这篇文章,它执行以下操作:
1) Checks for H drive or external drive with label of “BackupDrive”, if either of these are found it automatically starts a backup of user data
2) Starts an Async thread that deletes older backups based on how many days the user has specified he/she wants to keep
3) Starts the main thread that backups up user data and updates current file/folder and results into a console window.
如果应用程序遇到错误,它将通过电子邮件将结果发送给我,以下是我们销售人员今天早上的结果:
时间:
2010 年 10 月 28 日上午 8:25:31版本:
1.4.0.2消息:
发生意外的网络错误。完全例外:
System.IO.IOException:意外 发生网络错误。在 System.IO.Directory.DeleteHelper(字符串 fullPath,字符串 userPath,布尔值 递归)在 System.IO.Directory.Delete(字符串 fullPath,字符串 userPath,布尔值 递归)在 Microsoft.VisualBasic.FileIO.FileSystem.DeleteDirectoryInternal(字符串 目录,DeleteDirectoryOption onDirectoryNotEmpty, UIOptionInternal showUI,RecycleOption 回收, UICancelOption onUserCancel) 在 Microsoft.VisualBasic.MyServices.FileSystemProxy.DeleteDirectory(字符串 目录,DeleteDirectoryOption onDirectoryNotEmpty) 在 BackupUserData.TransferDataModule.fn_DeleteFolder(字符串 来源)其他信息:
函数 fn_DeleteFolder - 来源:h:\Backups\Backup 从 2010 年 10 月 26 日开始
此错误消息大约每周从我们的一位销售人员那里发生一次,我无法找出原因。似乎所有内容都正常删除和备份。如果他们拔掉网线,我预计删除或备份会失败,所以我认为这不是问题。
你知道发生了什么吗?
【问题讨论】:
标签: vb.net exception networking filesystems