473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Web Services And Msgbox

I am using code in a VB.NET dll that is used for a winforms app, and calling
some of the routines from a web service. Even though the code never makes it
to a message box, message boxes are spread throughout some of these
routines. I seem to be getting an error randomly in the code, even though
the code should not generate an error:

"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."

Can I not just use a global variable to write out an audit log instead of
showing message boxes? Or are web services going to error just because a
message box is a possibility in the code?

Derek
Jul 7 '08 #1
2 3957
Can I not just use a global variable to write out an audit log instead of
showing message boxes? Or are web services going to error just because a
message box is a possibility in the code?
There are two UI's that expose MessageBoxes:

1. A Windows client application (WinForms, Console)
2. A web client where the message box is provided in CLIENT code and
therefore rendered by the client (the browser).

Since a web service doesn't provide either of these UI's, you can't expect
the use of MessageBox.Show() to work.

If you would like to keep track of some data for the duration of the web
service for debuggin purposes, you could add: console.writeline(yourData)
and look at the output window as your code runs.
Jul 7 '08 #2

"Derek Hart" <de********@yahoo.comwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
>I am using code in a VB.NET dll that is used for a winforms app, and
calling some of the routines from a web service. Even though the code never
makes it to a message box, message boxes are spread throughout some of
these routines. I seem to be getting an error randomly in the code, even
though the code should not generate an error:

"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."

Can I not just use a global variable to write out an audit log instead of
showing message boxes? Or are web services going to error just because a
message box is a possibility in the code?
If you want to debug like that, it's on your development machine, and it's a
workstation such a XP you're debugging on, the use the NETSEND in code
pointing back to the machine-name. The NETSEND will pop a message box on the
screen. I have used that to debug DLL(s) and tell me where I was at in code
execution and in NT service applications. I don't see why you couldn't do
that with a Web service that being developed on your workstation.
Jul 8 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lloyd Sheen | last post by:
Sorry about the length of this post but I felt it was better to show all the details in order to get some resolution. I have the following senario: - a service which hosts objects for remoting...
1
by: shade1383 | last post by:
I have a web service that runs fine on my local machine and works fine with a VB .Net project remotely, but when I try to run using Access 2002 I get the following error. Server was unable to...
1
by: paul | last post by:
I have a Windows vb.net app that creates an Object from a .net dll that I wrote. If the dll fails to achieve its task I get it the re-throw an exception. the windows app encapulates the object...
9
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
5
by: Sara | last post by:
How could i detect there is a change to web service that has already accessed
1
by: Federico | last post by:
Hi I want to create a Web Services where I receive a Template DOT word a file XML and with these I create a Document that a I'll Send as Dime Attachment. <WebMethod()> _ Public Function...
0
by: Federico | last post by:
Hi I want to create a Web Services where I receive a Template DOT word a file XML and with these I create a Document that a I'll Send as Dime Attachment. <WebMethod()> _ Public Function...
2
by: (PeteCresswell) | last post by:
Seems like the toolkit does not handle complex data types. But that seems like much of the real world - once you get past something like just looking up a SIC code or adding two numbers. I see...
0
by: modirnico | last post by:
Ok I have created a VB .net WEb Service. and from VB 6.0 I would like to use this web service. My web service looks like this in .net <WebMethod(), SoapHeader("AccountInfo"),...
2
by: rakesh kumawat | last post by:
I am facing a problem while reading the result which is loaded in DOMDocument. In which I am sending a request to web service and getting a record of Single Order. This is my VB Code which is i am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.