I am developing an application when user clicks on a button by selecting a file it shows the download prompt with Open/Save/Cancel, Open and Save are working fine. But when clicked on cancel button there is an error being raised on the server with network exception SocketException is being throwed.
How to handle this issue. Can anyone help me in this regard.
It sounds like you are opening the connection before the user clicks any of the buttons. Maybe you should instead wait for the user to click a button to open the connection. So, if the user clicks Cancel, you can just close the dialog window and the connection will never have been opened, thus preventing that exception from being thrown on the server.
This cancel button you're describing... is it the one which the browser displays when it decides a response is a file to be downloaded? In that case the error is perfectly normal. It's the same error which occurs when the user interrupts a large page load by clicking on some other link.
subject: problem with download prompt cancel button