Access to the path denied error in C#

前端 未结 6 930
再見小時候
再見小時候 2020-12-03 00:43

I have read a similar post, but i just cant figure out the problem.

I have changed the windows permissions and changed routes.

When i try to save a file it t

6条回答
  •  伪装坚强ぢ
    2020-12-03 01:14

    You do not have permissions to access the file. Please be sure whether you can access the file in that drive.

    string route= @"E:\Sample.text";
    FileStream fs = new FileStream(route, FileMode.Create);
    

    You have to provide the file name to create. Please try this, now you can create.

提交回复
热议问题