Problem with setInterval(callserver,[period])

  • Thread starter Thread starter Felix Piskunov
  • Start date Start date
F

Felix Piskunov

Hi all.
I make a chat on ASP.NET 2.0 with Callbacks.
Every 3 second i get messages from server to my page.
But after some period of time (it differs) i have no response from server. I
click on buttons on the page, but there's no postback and no callback too.
Refresh doesn't work and no other site on my localhost can't be opened. And
all that till I reopen browser. Without reopening browser i can open the
same page but by another way ([computer_name]/[site_name], [ip]/[site_name]
etc).
And in each way it happens again and again i have to close my browse and
open it.
Does anybody know what a problem could be?
 
Felix said:
Hi all.
I make a chat on ASP.NET 2.0 with Callbacks.
Every 3 second i get messages from server to my page.
But after some period of time (it differs) i have no response from server. I
click on buttons on the page, but there's no postback and no callback too.
Refresh doesn't work and no other site on my localhost can't be opened. And
all that till I reopen browser. Without reopening browser i can open the
same page but by another way ([computer_name]/[site_name], [ip]/[site_name]
etc).
And in each way it happens again and again i have to close my browse and
open it.
Does anybody know what a problem could be?

I don't know exaclty what's happening, but it sound as if you are trying
to do a request while another request is still in progress.

The server will only execute one server page at a time per user. If one
page is being created that takes a long time, the browser will exhibit
the exact symptomes that you describe; requesting pages in the same
domain will not give a response, but requesting a page from a different
site (or the same site using a different name) works.

When you close the browser and reopen it, you will get a new session id,
so as far as the server is concerned, you are a completely new user.
That's why it starts working again.

So you might start looking for something that can make a request take a
long time to execute.

Perhaps you should use setTimeout instead of setInterval, so that you
don't make another request before the previous has returned, stacking up
requests if one takes longer than normal.
 
Back
Top