悬赏400分,紧急求助!!!
我这边的业务需求是要通过调用 WebService 来远程启动服务器上的 Winform 程序。
我首先写了一个 Winform 程序,接着又写了一个 WebService 程序,在这个 WebService 程序里面通过命令行的方式,启动那个 Winform 程序,写好以后,在 Visual Studio 开发环境下,调试运行都没有问题,Winform 程序可以被正常启动,然后部署到IIS上就报错了,错误信息如下:
当应用程序不是以 UserInteractive 模式运行时显示模式对话框或窗体是无效操作。请指定 ServiceNotification 或 DefaultDesktopOnly 样式,以显示服务应用程序发出的通知。
在 System.Windows.Forms.Form.Show(IWin32Window owner)
在 CCWin.CCSkinMain.Fidq2DTrRbjaq7x2UmS(Object , Object )
在 CCWin.CCSkinMain.OnVisibleChanged(EventArgs e)
在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Form.SetVisibleCore(Boolean value)
在 System.Windows.Forms.Control.set_Visible(Boolean value)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
Program.cs 文件中的“Application.Run(new FrmMain());”这行代码报错,导致 Winform 程序启动不了,无法实现业务需求,请教大家问题究竟出在哪里,应该如何解决?
补充说明:Program.cs 文件中没有 MessageBox.Show() 之类的代码