.net - Winforms UnauthorizedAccessException C# -


im trying upload & download file google drive via c#. upload process working great when im download file im error.i search on google , stackoverflow cant pass error.

string desktop = environment.getfolderpath(environment.specialfolder.desktop);     string filepath = desktop + @"\derslerim\"+textbox2.text;     directory.createdirectory(filepath); 

and

 using (var filestream = new filestream(filepath,filemode.create,fileaccess.write))      {          filestream.write(memorystream.getbuffer(), 0, memorystream.getbuffer().length);      } 

that code blocks create directory , create file areas. please me!


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -