IsolatedFileStream에서 작동이 허용되지 않는 예외를 해결하려면 어떻게해야합니까?WP7 예외 오류 - IsolatedStorageFileStream에서 작동이 허용되지 않음
디버깅 후 특정 줄을 읽지 못하고 캐치 부분으로 건너 뛴 것을 깨달았습니다. 나는 skydrive에 업로드뿐만 아니라 Windows 전화 7 사진 샘플에서 이미지를 읽고 있습니다. 아무도이 문제를 최대한 빨리 해결하는 방법에 나를 안내 할 수 있습니까? 감사합니다. .
public BitmapImage fileName { get; set; }
private void GetImages()
{
MediaLibrary mediaLibrary = new MediaLibrary();
var pictures = mediaLibrary.Pictures;
foreach (var picture in pictures)
{
BitmapImage image = new BitmapImage();
image.SetSource(picture.GetImage());
MediaImage mediaImage = new MediaImage();
mediaImage.fileName = image;
UploadFile(mediaImage, picture.Name);
}
}
public void UploadFile(MediaImage image, string filepath)
{
if (skyDriveFolderID != string.Empty)
{
this.client.UploadCompleted += new EventHandler<LiveOperationCompletedEventArgs>(ISFile_UploadCompleted);
infoTextBlock.Text = "Uploading backup...";
dateTextBlock.Text = "";
try
{
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
// error occurs HERE
IsolatedStorageFileStream readStream = myIsolatedStorage.OpenFile(filepath, FileMode.Open, FileAccess.Read);
readStream.Close();
this.client.UploadAsync(skyDriveFolderID, filepath, true, readStream, null)
}
}
예외 데이터를 게시 할 수 있습니까? 스택 추적 및 내부 예외 데이터가 유용합니다. –