0

So, I have a strange situation occurring in my web system.

I have a implementation of a Windows Service, that starts a .Net Remoting Server and stay waiting for calls of various clients.

At other side, I have a ASP.Net Web-forms Application, that can call some methods in this service, using the .Net Remoting Structure.

In a page, I have a button, this Button call a Ajax Call, and this Ajax Call, execute a async method at the Asp.Net Web-forms Application.

Everything works fine.

But, at complete Ajax Call, I have a second Async Call. After complete first Ajax Call, the second executes ok, but not immediately, only 3 or 4 seconds after.

It occurs just when the site are published in IIS, in Visual Studio (localhost), this not happened.

I can configurate my Service (server) as TCP or ICP, send the data in binary mode... With any configuration, the problem always happened.

Aditya Singh
  • 9,512
  • 5
  • 32
  • 55
Eduardo
  • 1
  • 2

1 Answers1

0

For months I found this same question in many forums and sites and finally I have a answer.

In truth, the problem was not in the AJAX call or multiple AJAX calls. The problem happened because there was a problem between the thread pool of .NET Remoting and the IIS Thread Pool.

This site make some calcs on the server side when the AJAX calls are executed. These calcs (executed with .NET Remoting) generate some logs in txt files.

To generate these logs, Windows needed to use the normal thread pool e for a IIS limitation. IIS waited about 5 seconds for the return of Windows thread pool. So, in this case, there existed two thread pools, one for Windows and another for IIS.

Removing the logs generation, I could execute the process in correct time. Some people find this same problem executing SQL queries in server side with ADO.

kjhughes
  • 106,133
  • 27
  • 181
  • 240
Eduardo
  • 1
  • 2