Error in retrieving datas through socket
Hello,
We are currently using a program where we recieve the details from the client. It is recieved through sockets.
It is working fine. i.e. When we start the program afresh we do get details properly. We recieve the data as strings and we store in a list box.But after two or three days we have an error stating as below
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.ListBox.ItemArray.IndexOf(Obj ect item, Int32 stateMask)
at System.Windows.Forms.ListBox.ObjectCollection.AddI nternal(Object item)
at System.Windows.Forms.ListBox.ObjectCollection.Add( Object item)
at StepIIServer.Server.RunClient2() in E:\stepII\Server.cs:line 346
8/7/2007 8:19:26 PM Error :$<MSG.Info.ServerLogin>
$DeviceName=352022000365427
$Software=steppII_2.4.3_final
$Hardware=STEPPII-55
$LastValidPosition=$GPRMC,145245.573,A,2941.6635,N ,07659.7630,E,0.00,2.34,070807,,
$IMEI=352022000365427
$PhoneNumber=
$LocalIP=117.96.20.147
$CmdVersion=2
$SUCCESS
$<end>
&IMEI=352022000365427,Distance=63936,
&GPRMC,145240.574,A,2941.6635,N,07659.7630,E,0. 00, 2.34,070807,,
<end>
and another error stating
ping
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.Socket.Receive(Byte[] buffer)
at StepIIServer.Server.RunClient2() in E:\stepII\Server.cs:line 288
8/7/2007 5:51:34 AM Error :&IMEI=352022000370849,Distance=1487,
&GPRMC,001830.515,A,2943.0151,N,07658.9818,E,0. 00, 8.79,070807,,
<end>
Will you please help
thanks
Hemalatha
|