【问题标题】:"An unexpected network error occurred." happens occasionally, unable to isolate“发生了意外的网络错误。”偶尔发生,无法隔离
【发布时间】: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


    【解决方案1】:

    它与您的代码没有任何关系。网络驱动程序有问题,请在 Windows 事件日志中查找原因。最终,必须由 LAN 管理员来解决问题。他可以发帖到 serverfault.com 寻求帮助。

    【讨论】:

    • 我相信你是上次帮助我的人,所以再次感谢。但我很好奇你怎么这么快就知道问题是什么?我找不到任何提到此错误的 MSDN 文章。如果你说的是真的,我很高兴,我可以处理那个异常,不做任何处理,我收到的邮件少了一封 :)
    • 我知道这个错误,之前在一个古怪的网络上看到过它。这是一个标准的 Windows 错误,代码 59,ERROR_UNEXP_NET_ERR。谷歌。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多