我用VS2005写了小程序,用于整理一个服务器上的数据(某些符合要求的批次信息)到本地。程序以前跑了很正常,近期公司更换源文件数据的服务器后(服务器名称和IP地址都没改),就经常报错(换回以前的服务器就正常),报如下的错误,哪个帮忙看看呢,是啥毛病呢?
未处理 System.IO.IOException
Message="没有更多文件。\r\n "
Source="mscorlib"
StackTrace:
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
在 System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
在 AutoFtpCp2Cust.App.CopyCp2Local() 位置 D:\运行程序\nnn1\AutoFtpCp2Cust\App.cs:行号 213
在 AutoFtpCp2Cust.App.Start() 位置 D:\运行程序\nnn1\AutoFtpCp2Cust\App.cs:行号 62
在 AutoFtpCp2Cust.Program.Main(String[] args) 位置 D:\运行程序\nnn1\AutoFtpCp2Cust\Program.cs:行号 11
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
使用try捕获异常