View Single Post
  #1 (permalink)  
Old 08-01-2007, 10:04 PM
prasannavigneshr prasannavigneshr is offline
D-Web Incredible
 
Join Date: Feb 2007
Posts: 1,318
prasannavigneshr is on a distinguished road
Send a message via MSN to prasannavigneshr
Default HTTP Web Response Exception - I cant able to trap.

Hi All



I have a .NET CF v2 program which uses asynchronous HttpWebRequest to download a file. During downloading via GPRS if I press and hold the end call key on my WM 5.0 device to close the GPRS connection, the program will crash. I have tried to place HttpWebResponse.GetResponseStream in a Try/Catch block but it does not catch the exception. On the emulator I cannot reproduce this problem.



This is the error message I get is:



program.exe

SocketExecption

An operation was attempted on something that is not a socket



at System.Net.Sockets.Socket.ReceivedNoCheck()

at System.Net.Sockets.Socket.Receive()

at System.Net.Connection.Read()

at ConnectionClient.Read()

at System.Net.HttpReadStream.NetworkRead()

at System.Net.ContentLengthReadStream.doRead()

at System.Net.HttpReadStream.ReadInternal()

at System.Net.HttpReadStream.Read()

at System.Net.HttpReadStream.doRead()

at WorkItem.doWork()

at System.Threading.Timer.ring()


Is there a way to catch this exception?


Help
__________________
Prasanna Vignesh
MCPD | Web Developer
Reply With Quote
Sponsored Links