Access to the path 'C:\Users\xxx\Desktop' is denied

后端 未结 5 443
北恋
北恋 2021-01-07 17:10

I have thoroughly searched the entire access denied questions and did\'t find any question related to access to windows form on my own system all the questions are related t

5条回答
  •  鱼传尺愫
    2021-01-07 17:30

    Probably you don't realize that you are trying to open the Desktop folder and then trying to use it as a file.

    If your intent is to write the bytes of the image to your database then your code should be

      fsrw = new FileStream(fname , FileMode.Open, FileAccess.ReadWrite);
    

提交回复
热议问题