I am getting the exception on running below code. It is run as windows service in c#.
It is working fine in my machine. Using Excel 2013.
Below is the core code
#region SmartPDFCaptureService
private void SmartPDFCaptureService(object source, ElapsedEventArgs e)
{
WriteServiceLog("" + SmartPDFLogCaption + "Entered " + MethodInfo.GetCurrentMethod().Name + " Method");
try
{
ExtractPDFData();
}
catch (Exception ex)
{
WriteErrorLog(MethodInfo.GetCurrentMethod().Name + " " + ex.Message, ex.StackTrace, true);
}
WriteServiceLog("" + SmartPDFLogCaption + "Finished " + MethodInfo.GetCurrentMethod().Name + " Method");
}
#endregion
What I have tried:
#region SmartPDFCaptureService
///
/// SMART_PDf_CAPTURE_SERVICE_SYNCHRONIZER
///
/// <param name="source" />
/// <param name="e" />
private void SmartPDFCaptureService(object source, ElapsedEventArgs e)
{
WriteServiceLog("" + SmartPDFLogCaption + "Entered " + MethodInfo.GetCurrentMethod().Name + " Method");
try
{
//Main Function to capture data from PDFs set in FileStore Folder
ExtractPDFData();
}
catch (Exception ex)
{
WriteErrorLog(MethodInfo.GetCurrentMethod().Name + " " + ex.Message, ex.StackTrace, true);
}
WriteServiceLog("" + SmartPDFLogCaption + "Finished " + MethodInfo.GetCurrentMethod().Name + " Method");
}
#endregion