Home > Net >  Using sysytem. IO under ubuntu calls
Using sysytem. IO under ubuntu calls

Time:04-24

Under Ubuntu vscode generated in c # a File "File. The Create (@"/home/userh/Project_C #/aaa "); , the results come out this exception, could you please tell me how to solve?

"The Exception has occurred: the CLR/System. UnauthorizedAccessException
An unhandled exception of type 'System. UnauthorizedAccessException' occurred in System. Private. The CoreLib. DLL: 'Access to the path'/home/userh Project_C #/aaa 'is denied.'
Inner exceptions found, see $exception in the variables window for more details.
Innermost exception System. IO. IOException: Permission denied "

Feeling is my namespace using sysytem. IO under ubuntu call the question!

CodePudding user response:

Is System. UnauthorizedAccessException, directory is not permission

CodePudding user response:

So how do I get permission?? Thank you very much!

CodePudding user response:

Hand in/home/userh Project_C #/create aaa try, may be you don't shut down the code has been created,

CodePudding user response:

Check the directory exists not

Net is the habit of always, first check directory, even under Windows to create a file, if the directory does not exist is abnormal
  •  Tags:  
  • C#
  • Related