Forum Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Recent "access denied" problems when writing to local application folder.

SergTomcatSergTomcat Member ✭✭

Code that wrote file to local app folder

var sPath =  Path.Combine(  Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) , sFileName);
var fileStream = new FileStream(sPath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None, bufferSize);

started to throw exception "Access denied" on Android, IOS and UWP.

UWP folder is something like "C:\Users\myuser\AppData\Local\Packages\myappid_70mbnm69z22s4\LocalState"
Android: "/data/user/0/myappid/files/.local/share/"
IOS (simulator): "/Users/admin/Library/Developer/CoreSimulator/Devices/0000000-1111-222-2333/data/Containers/Data/Application/44444-55555-66666-7777/Documents"

About a month ago or so everything worked fine.

Please, help or give advice.



Sign In or Register to comment.