_className "System.Reflection.TargetInvocationException" _innerException {System.IO.IsolatedStorage.IsolatedStorageException: Operation not permitted on IsolatedStorageFileStream. at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf) at System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, IsolatedStorageFile isf) at MarketApp.ShortTimeStoring.<FillPricesFromIsoStore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)} _message "Exception has been thrown by the target of an invocation." IsTransient false Source "mscorlib"
StorageFolder myFolder = await KnownFolders.PicturesLibrary.CreateFolderAsync("MarketApp", CreationCollisionOption.ReplaceExisting); StorageFile myFile = await myFolder.CreateFileAsync("Products.txt", CreationCollisionOption.ReplaceExisting); Stream f = await myFile.OpenStreamForWriteAsync(); using (StreamWriter sw = new StreamWriter(f)) { sw.WriteLine("Hello world!"); }
TargetInvocationException
InnerException
Stream
using
using (Stream f = await myFile.OpenStreamForWriteAsync())using (StreamWriter sw = new StreamWriter(f)){ ...}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)