Looking at the code, I don't see any reason for it to throw an exception. On the receiving device I get this exception: IOException Unable to read data from the transport connection. On the sending device I get this exception: IOException Unable to write data to the transport connection. It is not consistent exactly how many times it will loop before throwing the exception but it always happens within the while loop in these two places:
on the sending device inside: Send_Click(object sender, System.EventArgs e) at:
baseStream.Write(buffer, 0, numRead);
on the receiving device: inside: Receive_Click(object sender, System.EventArgs e) at:
int numRead = baseStream.Read(buffer, 0 , buffer.Length);
Any help will be greatly appreciated!

IRDA file transfer problems
rpp
I've attempted to use the MSDN sample code to send files of varying sizes, including northwind.sdf which was 1.32Mb in size, with no problems. I simply substituted my files into the sample code and everything worked. Could your devices' IrDA be shutting down for some reason Perhaps you have altered the code in some way
HillBillyB
subir.talukder
buffersize = 500
then 500 bytes becomes the new barrier.
DavidThi808
It still seems like a code issue:
buffersize = 256;
NotMyself
http://msdn2.microsoft.com/en-us/library/system.net.sockets.irdaclient.aspx#
Is anybody else having this problem please help me.
Ryan F
Lameck
Humaneast
MagedSalah
System.IO.IOException
"Unable to read data from the transport connection"
inner exception:
System.Net.Sockets.SocketException
"An existing connection was forcibly closed by the remote host"
Is there some kind of timout setting I can change somewhere