am used the below code for automatically call for reporting.But after 30seconds the application hangs(i.e UI is freeze)for several seconds.
How to solve this without hanging problem. below is my code
System.Windows.Threading.DispatcherTimer dispatcherTimer2 = new
System.Windows.Threading.DispatcherTimer();
dispatcherTimer2.Tick += new EventHandler(dispatcherTimer2_Tick);
dispatcherTimer2.Interval = new TimeSpan(0, 0, 30);
dispatcherTimer2.Start();
private void dispatcherTimer2_Tick(object sender, EventArgs e)
{
automaticreportfunction();
}
After 30seconds it hangs the application,how to solve this