System.InvalidOperationException creating ComparisonSession
pince
Posts: 7
I am creating a windows service to run a compare between some tables automatically overnight and report on exceptions. I am getting a System.InvalidOperationException when I try to instantiate a new ComparisonSession (ie Dim _session As New ComparisonSession). The rest of the exception message says "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."
What am I doing wrong that this object is trying to start a modal dialog box in a Windows Service?
What am I doing wrong that this object is trying to start a modal dialog box in a Windows Service?
Comments
This error usually meany your SDK application is not licensed (the licensing assembly is trying to tell you this, but it can't unless you run the service in "interact with desktop" mode.
You'll want to troubleshoot this and double-check your build process.