Showing a modal dialog box or form when the application is not running in UserInteractive mode
<p>Hi all I am getting this error when my site was in live when trying to show print preview dialog</p>

<pre><code>PrintPreviewDialog ppdlg = new PrintPreviewDialog();

ppdlg.ShowDialog();
</code></pre>

<p>How can I resolve this error</p>

<p>Complete error</p>

<p><code>Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.</code></p>
