IsolatedStorageException是未處理:操作不premitted上IsolatedStorageFileStream
我使用SDK 7.1開發Windows Phone的一個簡單的應用程序,而我得到的錯誤
IsolatedStorageException是未處理:操作不premitted上IsolatedStorageFileStream
內MainPage.xaml.cs
代碼段:
私人無效btnRd_file_Click(對象發件人,RoutedEventArgs E)
{ IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream FS = ISF.OpenFile("pwd1.txt", FileMode.Open, FileAccess.Read); using (StreamReader SR = new StreamReader(FS))
試圖運行在Windows Phone模擬器中的應用。
請不要使用截圖。只需在這裏發佈代碼(在一個問題中),並且也發佈完整的異常消息和StackTrace。看看別人怎麼做(http://stackoverflow.com/questions/12962388/assigning-ienumerable-covariance) –
截圖沒什麼錯,這就是插入圖像按鈕存在的原因。 – theChrisKent
確保將文件構建類型設置爲內容,或者其資源使用適當的路徑來引用文件。 –