Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在服务器上的备份完成后,我尝试将 .bak 文件直接复制到本地计算机。
在测试和调试时我从来没有遇到过任何问题,但是在部署之后我得到了很多 FileNotFoundExceptions。
我发现,特别是如果您在另一台机器上进行备份,备份文件需要一些额外的时间才能准备好。
在开始移动过程之前稍等片刻为我解决了这个问题。
移动文件
公共无效WaitForFileToExist(字符串路径){ 而(文件。存在(路径)==假){ System.Threading.Sleep(10); } }