0
votes

We're developing .Net Application using asp.net and C# and .Net Framework 3.5.

We are using windows form message box in a .Net application. This windows form works great on the debug mode but once we publish the application this message box won’t work. We are referencing System.Windows.Form.dll in order to use the message box features. Kindly advice if we need to register this DLL or follow some configuration steps in order to solve this problem.

Thank in advanced, Jad

2
Are you developing WinForms or WPF application? Which Framework?Drake
No i'm developing .Net Application using asp.net and C# and .Net Framework 3.5Jad M

2 Answers

5
votes

Don't use MessageBox in a web application. It will show up on the server console, there's nobody around to click the OK button. I assume that ASP.NET has some counter-measures against it, given that it is such a serious denial-of-service attack.

0
votes

If you are using unreferenced classes a project/solution is usually not even compiled. So probably the problem is in another place. Are you sure that the code that should display the MessageBox is executed?

EDIT: When you develop web applications (ASP.NET), as described by you in comments, you cannot use Winforms MessageBox.

Try showing it with javascript, if you really need it

Response.Write("<script>alert('This a message')</script>");