我使用Socket从pc端向wp发送文件
在wp端创建IsolatedStorageFileStream对象时发生错误
异常信息如下
[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
发生异常的位置是一个自定义事件,红色语句
private void ssReceiver_ReceiveFileCompleted(object sender, SocketOperatorEventArgs e)
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
{
...
using (IsolatedStorageFileStream isfs =isf.CreateFile(Path.Combine("Folder", ssReceiver.SocketFile.FileName)))
{
...
}
}
}
事件的调用是在SocketAsyncEventArgs的Completed事件中
该自定义事件如下
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)
{