Probi Forumi

Probi Forumi

  • NA
  • 21
  • 0

messagebox in web application

Aug 4 2008 1:02 PM

Hello

I have this code for a message box in my web application

DialogResult reply = MessageBox.Show(text, "Files", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

if (reply == DialogResult.Yes)

{if  (exst.Equals(".doc")) openword( dest, "yes");}

else if (reply==DialogResult.No)

{if (exst.Equals(".doc")) openword ( dest, "no");}

when I run this application in the localhost in VS2005 it has no problem, but when I publish the project and run it in the application server it gives this error :

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.

what is the problem and what I should do?

thanks a lot

Probi


Answers (4)