在 Silverlight 中保存到可移动驱动器
在我的 SL3 应用程序中,我提示用户选择保存位置,由于目标受众的原因,该位置很可能是可移动驱动器。
如果用户尝试弹出/移除驱动器,Windows 会抱怨它“正在使用”。
如果用户随后再次保存文件,但这次保存到固定驱动器,则可以弹出/删除可移动驱动器。
几乎就像此 .NET 问题正在发生一样。遗憾的是,由于 .NET 支持的减少和 SL 安全限制,这两种解决方法都无法使用。
有什么想法吗?
In my SL3 application I prompt the user to choose a save location, which will most likely be a removable drive due to the target audience.
If the user attempts to eject/remove the drive then Windows complains that it is "in use".
If the user then saves the file again but this time to a fixed drive then the removable drive can then be ejected/removed.
It is almost as if this .NET issue is happening. Sadly, because of the reduced .NET support and SL security restrictions both of the workarounds cannot be used.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用 SaveFileDialog 吗?如果不是 - 那么情况并非如此。
如果没有看到任何代码,就很难回答,但是您是否有可能没有关闭文件(File.Close())?
据我记得您无法更改 SL 中的当前目录,所以我有点怀疑您的问题原因与链接中的解决方案相同。
Are you using SaveFileDialog? if not - then that is not the case.
Without seeing any code it's kind of hard to answer, but is it possible you are not closing the file (File.Close())?
As far as i recall you CANNOT change the current directory in SL , so i kind of doubt the cause of your problem is the same as the solution in your link.