开发者

Calling web service asynchronously still hangs application

I have an aspx page with three input buttons.

The first button, using javascript/ajax, fires off a call to an IHttpAsyncHandler. The Handler calls a web service on another server (which generates a report and returns the path to the report file). In the ajax callback, XmlHttp.responseText returns the proper path and a window.open(path) call opens the report, no problem.

The other two buttons open new windows to other aspx pages on the current site.

The problem is, after I click the first button, clicking the other two buttons do not give me the aspx pages until after the report is displayed. Blank windows do pop up, but nothing is rendered until the report is done.

What causes that hang time? I thought calling the report using ajax and an Async handler would not interfere with popping up other aspx pages.

Other attempts:

1. creating a reportGenCompletedEventHandler in the main aspx and calling the service using repor开发者_StackOverflow社区tGenAsync(...)

2. calling (in the main aspx)

    AddOnPreRenderCompleteAsync(New BeginEventHandler(...),New EndEventHandler(...)  

3. calling (in the main aspx)

    Page.RegisterAsyncTask(New PageAsyncTask(...))
    Page.ExecuteRegisteredAsyncTasks()  

4. same as above, creating a separate AsyncHandler, but also creating a separate thread.

Obviously, I'm missing something here. Is it possible to call a web service elsewhere and still have full control of your app?

Thanks


Are the pages you're trying to hit on the same web host? If so, I'm guessing you've hit the "Max 2 concurrent connections to the same host" limit.

The link here on asp.net describes how IE8 lets you go beyond that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜