首页 > 其他 > 详细

VS调试出现某路径拒绝访问的问题解析

时间:2015-10-24 20:09:05      阅读:251      评论:0      收藏:0      [点我收藏+]
When we use Visual Studio to develop our program to access a file, we often encounter a common issue, that is"UnauthorizedAccessException". For this issue, I think there are some possible reasons:
1. The file is read-only  -- you have to modify the property of the file
2. Insufficient permission of the account  -- you maybe run the vs with administrator accouont
3. Wrong file path -- this is what I need to remember specially
e.g
FileStream fs = new FileStream(@"F:\GWork\WorkSpace\Serializable\demo.txt",FileMode.Create);
the code above, if you missing the "demo.txt" which in red, you will meet the issue which mentioned above.

VS调试出现某路径拒绝访问的问题解析

原文:http://www.cnblogs.com/gavin-king/p/4907458.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!