NetTalk Central

Author Topic: Using NT for a webservice  (Read 3655 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Using NT for a webservice
« on: February 06, 2012, 03:15:25 AM »
Hi,

I have done some development with NT6 to provide webservice capabilities. In my testing, I found that when a client reposts the same request (or another) before the first request is completed, two error messages are displayed (see attached).

My assumption is that the first request needs to be finished before a next request from the same client can be processed - which is an acceptable assumption because normally the client will not send another request that quick. But when it does happen and the error messages are displayed, it stops the processing completely.

I then switch "Suppress Error Messages" on the WebServer on and the messages are not displayed. If this happens (as in the case of a denial-of-service attack), where can I pick up that repeated requests are sent from a single client?

Thys

[attachment deleted by admin]

bruce2

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • Email
Re: Using NT for a webservice
« Reply #1 on: February 06, 2012, 12:02:38 PM »
Suppress error messages should be on for deployment.

If you want to analyse requests, turn on logging and analyse log files.

Incidentally your assumption that one request finishes before the next starts is very incorrect.

Cheers
Bruce

rjmiller

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
    • Email
Re: Using NT for a webservice
« Reply #2 on: February 06, 2012, 12:20:43 PM »
Not sure if this is what you mean but I have built some "dashboards" which sit on desktop continuously displaying status from soap server.  Worked very nicely... keeps salesreps motivated when they can watch their commission tick up (or down?).

I haven't seen the errors that you speak of but what I do is very simple and fast.  Course I bet some of those guys click on refresh like a slot machine!
« Last Edit: February 06, 2012, 12:22:19 PM by rjmiller »

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: Using NT for a webservice
« Reply #3 on: February 06, 2012, 12:23:23 PM »
Thanks Bruce. Just to verify to understand it correctly. When a request is processed for a connection and the same connection posts another request before the first is completed, then it seems like it is handled on the same thread and therefore the second request could wait for the first to be completed. If this assumption is incorrect, it means the second request is handled on a separate thread from the first request even though it's from the same connection. When the error messages are not surpressed, the errors -40 and -34 seems to describe that the connection can't be used for another request. That's why I assumed it runs on the same thread.

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using NT for a webservice
« Reply #4 on: February 06, 2012, 11:02:56 PM »
>> Thanks Bruce. Just to verify to understand it correctly. When a request is processed for a connection and the same connection posts another request before the first is completed, then it seems like it is handled on the same thread and therefore the second request could wait for the first to be completed.

very incorrect.
All incoming requests are on their own connection, and processed on their own thread.
A browser may have multiple connections open to the server at the same time.

>> If this assumption is incorrect, it means the second request is handled on a separate thread from the first request even though it's from the same connection.

yes, it's handled on another thread. No, it's not on the same connection.

Cheers
Bruce