VS调试出现某路径拒绝访问的问题解析
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.
Impossible = I'm possible
Don't be the same, be better. Just do it.
You'll be there.

浙公网安备 33010602011771号