如何启用IIS服务器的消息框中 [英] how to enable message box in IIS server

查看:632
本文介绍了如何启用IIS服务器的消息框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立使用vb.net 2008 Web应用程序。

I am building web application using vb.net 2008.

当我调试使用常见的编译器可同时显示消息框,但是当我使用IIS服务器不能显示的消息框,并导致错误页面。

when I debug using the common complier it can show the Message box, but when I use IIS server the message box can't be shown and cause error page.

错误页说:

显示模式对话框或窗体,当应用程序没有运行
  在UserInteractive模式是不是一个有效的操作。指定
  ServiceNotification或DefaultDesktopOnly样式,以显示
  从服务应用程序的通知。

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.

有任何设置需要做来解决这种情况?

is there any setting need to be done to solve this case?

谢谢,

推荐答案

使用可以指定 ServiceNotification DefaultDesktopOnly 风格,作为错误信息已经告诉你:

Use could specify the ServiceNotification or DefaultDesktopOnly style, as the error message already told you:

MessageBoxOptions枚举

ServiceNotification

消息框显示在活动桌面上。
  呼叫者是通知事件的用户的服务。功能显示当前活动桌面上的消息框,即使没有用户登录到计算机

The message box is displayed on the active desktop. The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer.

DefaultDesktopOnly

消息框显示在活动桌面上。
  这个常量是一样的,除了ServiceNotification该系统显示的消息框中只有交互式窗口工作站的默认桌面上
  DefaultDesktopOnly将导致上调的MessageBox失去关注的应用程序。所显示的消息框将不会使用视觉样式。欲了解更多信息,请参见使用视觉样式呈现控件。

The message box is displayed on the active desktop. This constant is the same as ServiceNotification except that the system displays the message box only on the default desktop of the interactive window station DefaultDesktopOnly will cause the application that raised the MessageBox to lose focus. The MessageBox that is displayed will not use visual styles. For more information, see Rendering Controls with Visual Styles.

不过问自己:当你RUND一个Web应用程序,是怎么回事服务器前坐,随时阅读,然后点击的MessageBox ?也许想这样的消息写入事件 - 或者应用程序日志来代替。

But ask yourself: When you rund a web application, how is going to sit before the server, ready to read and click the MessageBox? Maybe to want to write such messages to the event- or application log instead.

这篇关于如何启用IIS服务器的消息框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆