I wrote a window service which will convert files from XXX to XXX using c++ DLL, but when system.accessviolationexception
occurs i am not able to catch these exception even though i have try
and catch
block.
But after some time my service automatically crashes down and it will write the logs in event viewer.
Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException
try
{
PDFNet.PDF.Convert.ToHtml(doc, htmlSourceFolderName, options);
}
catch (System.AccessViolationException avex)
{
logMgr.Error(avex.StackTrace);
}
catch (Exception ex)
{
logMgr.Error(avex.StackTrace);
}
Is there any way so that i can get the desired result.