2013年7月20日星期六

Exception occurred when creating IsolatedStorageFileStream

 This post last edited by the kiygaven on 2013-07-07 11:53:33 I use the Socket from the pc side to send the file to wp
IsolatedStorageFileStream object in wp-side error occurred while creating
exception information is as follows
[IsolatedStorage_Operation_ISFS]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go. microsoft.com / fwlink /? linkid = 106663 & Version = 4.0.50829.0 & File = mscorlib.dll & Key = IsolatedStorage_Operation_ISFS

exception occurred location is a custom event, red statement
private void ssReceiver_ReceiveFileCompleted (object sender, SocketOperatorEventArgs e)
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication ())
{
...
using (IsolatedStorageFileStream isfs ; = isf.CreateFile (Path.Combine ("Folder", ssReceiver.SocketFile.FileName)))
{
...
}
}
}

event call is SocketAsyncEventArgs Completed event in
The custom event as follows
public delegate void ReceiveFileCompletedEventHandler (object sender, SocketOperatorEventArgs e);
public event ReceiveFileCompletedEventHandler ReceiveFileCompleted;

protected virtual void OnReceiveFileCompleted (SocketOperatorEventArgs e)
{
if (this.ReceiveFileCompleted! = null)
this.ReceiveFileCompleted (this, e);
}


void ReceivesCompleted (object sender, SocketAsyncEventArgs e)
{
...
Deployment.Current.Dispatcher.BeginInvoke (() =>
{
this.ReceiveFileCompleted (this, new SocketOperatorEventArgs () {...} );
});
...
}

Will this anomaly is due to the thread question, what is the solution.
------ solutions --------------------------------------- -----------------

did not create this Folder folder achieve it.
 
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication ())
{
/ / ...
isf.CreateDirectory ("Folder");
using (IsolatedStorageFileStream isfs = isf.CreateFile (Path. Combine ("Folder", ssReceiver.SocketFile.FileName)))
{
/ / ...
}
}


who trouble you want to reply, please quote who is under,,, or even turn posts asking many others,,,

没有评论:

发表评论