Solved

ASP.Net: MsgBox in a windows dll added to references in web application

Posted on 2004-10-27
356 Views
Last Modified: 2008-02-01
Hello experts,
I created an ASP.Net web application (in C#.Net) as above mentioned.
I also created a windows class (in VB.Net) containing only a method with MsgBox inside.
In the web application I invoked that method.

In .Net 2002 (version 1.0) this worked,
the message appeared always on the web server
(the clients cannot see that message,
 but they need to wait until the OK button of the MsgBox has been clicked).

In .Net 2003 (version 1.1) I get the error
---
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
---
My question is, is there a way to get rid of this?

I know that this might be a very rare functionality,
but it did work in .Net 2002.

  Thank you for any help.

   HStrix
0
Question by:HStrix
    9 Comments
     
    LVL 22

    Expert Comment

    by:CJ_S
    Why would you want a messagebox on the server? If you really neewd to log something you might want to write to the EVentLog.
    0
     

    Author Comment

    by:HStrix
    That's why I wrote
    ---
    I know that this might be a very rare functionality,
    but it did work in .Net 2002.
    ---
    I only wanted to be able to do this,
    the problem what you mean is
    that someone needs to watch the server too.

    For recording it would be possible  (as you mentioned) to use the eventlog or another own created log.

    0
     
    LVL 22

    Expert Comment

    by:CJ_S
    >> I know that this might be a very rare functionality

    Yea, it sure is, and I just cannot understand why you would want that. I mean, you shouldn't show a messagebox at the server. What is the reason you want this? I'm fairly sure there are better methods...
    0
     

    Author Comment

    by:HStrix
    Currently I can only imagine special online test situations.

    But I want to be prepared to know how I could do that just-in-case...

    0
     
    LVL 22

    Expert Comment

    by:CJ_S
    Even though you definitely shouldn't??

    One way would be by creating a Remoting Application. Connect to this application from your asp.net application and call a OneWay method. This method can then give the messagebox to the user, or write out a message in a list.

    Although I still cannot see any use for this...

    CJ.



    0
     

    Author Comment

    by:HStrix
    0
     
    LVL 22

    Expert Comment

    by:CJ_S
    Does it actually work for ASP.Net?

    Glad you resolved it yourself though  :-)
    0
     

    Author Comment

    by:HStrix
    I checked it in Asp.Net 2003 (version 1.1) using a dll created as windows class.
    The dll has a method with this messabox statement.
    0
     

    Accepted Solution

    by:
    PAQed with points refunded (500)

    modulo
    Community Support Moderator
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    5 Experts available now in Live!

    Get 1:1 Help Now