Storeasync()在Windows 8中给予例外,但在Windows Phone 8中正常工作

StreamSocket socket = null; DataWriter datawriter = null; DataReader dataReader = null; socket = new StreamSocket(); datawriter = new DataWriter(socket.OutputStream); dataReader = new DataReader(socket.InputStream); public async Task<byte[]> sendreceive(byte[] bytes) { try { datawriter.WriteBytes(bytes); await datawriter.StoreAsync(); //Exception here } catch (Exception ex) { throw ex; } } //connect the socket socket = new StreamSocket(); await socket.ConnectAsync( rfcommService.ConnectionHostName, rfcommService.ConnectionServiceName, SocketProtectionLevel.BluetoothEncryptionAllowNullAuthentication); 

发生exception的情况是: A first chance exception of type 'System.InvalidOperationException' occurred in filename.exe

Additional information: A method was called at an unexpected time. (Exception from HRESULT: 0x8000000E)

请帮助,如果有人可以。