I am using a third party software for control proxy in my system.
so every network connection uses that proxy software.
in my windows application i have some codes for upload my files through FTP.
i have many try-catch around ftp class and in main application for prevent showing any error and stop the application.
when that proxy software is run and that ftp class is trying to connect to my server and suddenly i close that proxy software my program is closed for unknown reason.
how can i prevet that program to close on crash and keep it alive?
why those tr-catch can not do their job?
EDIT 1 :
those catch parts never run to get the error.
please see this pic :
but normal exception window is like this :
EDIT 2 :
and my try/catch is like below:
class My_FTP
{
public void upload()
{
try
{
//Codes
CRASH IS HERE AND WE NEVER JUMP TO CATCH EREA!!!!!!!!!!!!!!!!!!!!
while (bytesSent != 0)
{
}
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
try
{
My_FTP my_ftp_ = new My_FTP();
my_ftp_.upload();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
try
{
//Other_Codes;
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
i tried these :
Thread: "vshost32-clr2.exe has stopped working" -> not programmatically
VShost32.exe stopped working, but I can continue debugging -> no help