NetTalk Central

Author Topic: MessageBox and WebServer  (Read 2477 times)

ShanePeterson

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
MessageBox and WebServer
« on: July 09, 2007, 11:36:03 AM »
I'm using CapeSoft's MessageBox templates to keep message box's from appearing on the server.  I also have logging turned on.  In the log file there is field for UserName.  Because I have the MessageBox templates set to not open, the UserName field is always populated with "Auto" instead of the Login ID of the user.  I've even tried populating ThisMessageBox.LoggedIn with the login id manually, but it is still overridden with "Auto"

Is there any way around this?

Another problem I have, is when I have an error on the server (the message window doesn't appear as expected and the log file is updated) the client web page hangs and eventually times out.  Is there a setting I'm missing to at least have the web client return to the current page?

Thanks in advance for any help.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: MessageBox and WebServer
« Reply #1 on: July 10, 2007, 10:37:10 PM »
Hi Shane,

Let me answer the second part first.
Simply put, no, you can't send the message back to the user. And to be honest, you probably don't want to.

For security reasons displaying internal errors to users, while convenient during the development phase, often results in "teaching" the user more about your system than you want them to know. Many systems have been compromised (not NetTalk, but generally speaking) because the error message helpfully contained the name, and password of the database being accessed. Plus there are other issues which I won't go into here.

During development your goal is to make sure messages don't pop up. Not because you've suppressed them, but because you did you saw them, and added code to prevent that hole in your app.

Clearly though, you might miss some, and so you need to suppress-and-log for the real deployment. This is a bit dangerous though because unless you know the message, you don't know what the result of the message will be. ie a Message often asks the user to make a decision, as they can't see it you need to make the decision for them (ie accept the default answer) - and the effect of that answer is unknown (because it relies on the code which called the Message in the first place).

The best way to "suppress" the messages is to use the MessageBox "timeout" feature. You can set the timeout for the message windows to be say 10 seconds, then you'll see them as a developer, but they close if you're not watching them.

Ok, now to setting the user variable for the person who is logged in.
This is difficult at the moment because the main MessageBox class is unthreaded, and as you've probably figured out, the user name belongs to a thread. I'll be working with Geoff on this to see what the best solution is.

Cheers
Bruce

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Re: MessageBox and WebServer
« Reply #2 on: November 02, 2011, 03:03:47 AM »
Because I have the MessageBox templates set to not open, the UserName field is always populated with "Auto" instead of the Login ID of the user.  I've even tried populating ThisMessageBox.LoggedIn with the login id manually, but it is still overridden with "Auto"
Is there any way around this?

Hi all,

Just using CapeSoft MessageBox and I have also this problem.
I don't want to log "Auto" (or "Timer"), but the username.

Anybody who can help me please?

Best regards
Jeffrey

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Re: MessageBox and WebServer
« Reply #3 on: November 02, 2011, 06:21:14 AM »
Reading the help, I see how to override the values "Auto" and "Timer".
So problem solved!

Best regards
Jeffrey