Hi,
I have developed a windows service and i included System.Windows.Forms in windows service and i used one message box. It displays the message box while debugging the application in Visual Studio 2012. I installed the windows service through installutil.exe. But once after installation, the service is not getting started. It shows error message like the service cannot be started on local computer because the service may not be in use. When i clicked the log messages in Server manager i got the following error message Service cannot be started.
System.InvalidOperationException: 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.
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) at System.Windows.Forms.MessageBox.Show(String text)
Any one please help me to resolve this issue.
Thanks in advance