473,724 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display 'In Process' page when calling async WebService

Hi all,

Can anyone give me some links about how to do an async web service call
from aspx and display a temperary page before the web service returns?

Thanks,
Homa Wong

Nov 23 '05 #1
5 4044
Hi,

Hopefully the following link may help you.

http://msdn.microsoft.com/library/de...chronously.asp

cheers,

Jerome. M

"Homa" wrote:
Hi all,

Can anyone give me some links about how to do an async web service call
from aspx and display a temperary page before the web service returns?

Thanks,
Homa Wong

Nov 23 '05 #2
Hi,

The Following link may help you to understand beeterly about the waithandle.
I hope you can make you of this, to display the "In Process Page" during your
async call.

Cheers,

Jerome. M
"Homa" wrote:
Hi all,

Can anyone give me some links about how to do an async web service call
from aspx and display a temperary page before the web service returns?

Thanks,
Homa Wong

Nov 23 '05 #3
Hi,

The problem with ASP.NET is when a "In Progress page" is displayed, the
HttpContext already end response, i.e., all information are sent to the
client. So when a callback returns, nothing more can be written to the
client's browser. And if I do a redirect, it result an error because
the code behind class doesn't know which browser it should communicate
to (because it ended response to the browser thus the client browser is
in a "disconnect ed" state).
I can think of two ways to do this.

1. Use JavaScript.
Have a timed redirect script inject to the "In Progress page." When
times up, the page redirects to the result page and if the result is
not ready, it goes back to the "In progress page" and wait again until
the result is ready (or timeout). The problem of this is the timed
parameter is fixed because you don't know in real time how long will
the web service take to return your call. So in the worst case it takes
twice as long to get the result (of course, this can be reduced but
it's kind of like a passive fix to the problem).

2. Tell the "In progress page" to send part of the page to the client
browser while waiting for the result. This would be ideal but I don't
know how to do it.

I don't have much problem dealing with async call directly, but how the
Page and the Client browser interact to get the solution works.

The solution I want is like the bank websites that after you login, it
display a page saying "We are gathering your information..." and then
direct you to summary page of your bank account.

Thanks,
Homa Wong

DotNetJerome wrote:
Hi,

The Following link may help you to understand beeterly about the waithandle. I hope you can make you of this, to display the "In Process Page" during your async call.

Cheers,

Jerome. M
"Homa" wrote:
Hi all,

Can anyone give me some links about how to do an async web service call from aspx and display a temperary page before the web service returns?
Thanks,
Homa Wong


Nov 23 '05 #4
I've never done this before but I imagine you need Response.Flush. .. something
like this.

private void Page_Load(objec t sender, System.EventArg s e)
{
Response.Write( "Wait 4 Seconds...<BR>< BR>");
Response.Flush( );

System.Threadin g.Thread.SpinWa it(99999999);

Response.Write( "4 seconds is up. Redirecting in 4 seconds to google.com");
Response.Flush( );

System.Threadin g.Thread.SpinWa it(99999999);
Response.Write( "<script>window .location='http ://www.google.com' ;</script>");
Response.End();
}

For some reason this code I have posted doesn't totally work cause sometimes
the 'wait 4 seconds' message doesn't show up. Its just to give you an idea
and you can play around with it.

http://blogs.msdn.com/nunos/archive/....aspx#FeedBack might
help you.

-Trevor
Hi,

The problem with ASP.NET is when a "In Progress page" is displayed,
the
HttpContext already end response, i.e., all information are sent to
the
client. So when a callback returns, nothing more can be written to the
client's browser. And if I do a redirect, it result an error because
the code behind class doesn't know which browser it should communicate
to (because it ended response to the browser thus the client browser
is
in a "disconnect ed" state).
I can think of two ways to do this.
1. Use JavaScript.
Have a timed redirect script inject to the "In Progress page." When
times up, the page redirects to the result page and if the result is
not ready, it goes back to the "In progress page" and wait again until
the result is ready (or timeout). The problem of this is the timed
parameter is fixed because you don't know in real time how long will
the web service take to return your call. So in the worst case it
takes twice as long to get the result (of course, this can be reduced
but it's kind of like a passive fix to the problem).

2. Tell the "In progress page" to send part of the page to the client
browser while waiting for the result. This would be ideal but I don't
know how to do it.

I don't have much problem dealing with async call directly, but how
the Page and the Client browser interact to get the solution works.

The solution I want is like the bank websites that after you login, it
display a page saying "We are gathering your information..." and then
direct you to summary page of your bank account.

Thanks,
Homa Wong
DotNetJerome wrote:
Hi,

The Following link may help you to understand beeterly about the

waithandle.
I hope you can make you of this, to display the "In Process Page"

during your
async call.

Cheers,

Jerome. M
"Homa" wrote:
Hi all,

Can anyone give me some links about how to do an async web service
call
from aspx and display a temperary page before the web service
returns?
Thanks,
Homa Wong


Nov 23 '05 #5
Hi,
I actually found the solution. Here is the link.

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Cheers,
Homa Wong

Trevor Pinkney wrote:
I've never done this before but I imagine you need Response.Flush. .. something like this.

private void Page_Load(objec t sender, System.EventArg s e)
{
Response.Write( "Wait 4 Seconds...<BR>< BR>");
Response.Flush( );

System.Threadin g.Thread.SpinWa it(99999999);

Response.Write( "4 seconds is up. Redirecting in 4 seconds to google.com"); Response.Flush( );

System.Threadin g.Thread.SpinWa it(99999999);
Response.Write( "<script>window .location='http ://www.google.com' ;</script>"); Response.End();
}

For some reason this code I have posted doesn't totally work cause sometimes the 'wait 4 seconds' message doesn't show up. Its just to give you an idea and you can play around with it.

http://blogs.msdn.com/nunos/archive/....aspx#FeedBack might help you.

-Trevor
Hi,

The problem with ASP.NET is when a "In Progress page" is displayed,
the
HttpContext already end response, i.e., all information are sent to
the
client. So when a callback returns, nothing more can be written to the client's browser. And if I do a redirect, it result an error because the code behind class doesn't know which browser it should communicate to (because it ended response to the browser thus the client browser is
in a "disconnect ed" state).
I can think of two ways to do this.
1. Use JavaScript.
Have a timed redirect script inject to the "In Progress page." When
times up, the page redirects to the result page and if the result is not ready, it goes back to the "In progress page" and wait again until the result is ready (or timeout). The problem of this is the timed
parameter is fixed because you don't know in real time how long will the web service take to return your call. So in the worst case it
takes twice as long to get the result (of course, this can be reduced but it's kind of like a passive fix to the problem).

2. Tell the "In progress page" to send part of the page to the client browser while waiting for the result. This would be ideal but I don't know how to do it.

I don't have much problem dealing with async call directly, but how
the Page and the Client browser interact to get the solution works.

The solution I want is like the bank websites that after you login, it display a page saying "We are gathering your information..." and then direct you to summary page of your bank account.

Thanks,
Homa Wong
DotNetJerome wrote:
Hi,

The Following link may help you to understand beeterly about the

waithandle.
I hope you can make you of this, to display the "In Process Page"

during your
async call.

Cheers,

Jerome. M
"Homa" wrote:
Hi all,

Can anyone give me some links about how to do an async web service

call
from aspx and display a temperary page before the web service

returns?
Thanks,
Homa Wong


Nov 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
10143
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running time, and B. A progress bar. 2. I have this working with a refresh timer: <META http-equiv="refresh" content="5">
12
2368
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my head. Natuarally it will not work. I expect it to use up all resources looping, which will not allow the process to complete. The process takes about 60 seconds, because the .bat file it is calling is rebuilding mulitple .NET solutions and projects...
1
1480
by: David Elliott | last post by:
I have a distributed system that processes documents. There currently is an Async Webservice in place and this works fine. My customer is requesting a Sync Webservice call. I am trying to determine the best way to implement this. I thought I would have the Sync call to enter a sleep state and upon waking check a ArrayList that was populated at the completion of the processing. If there is a doc then return it, otherwise sleep.
5
5041
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page that calls the web service to render a vertical strip of images. After doing some research I am unable to find some vb.net code that can assist in what I want to achieve. The closest thing I found was
0
1554
by: Jens Weibler | last post by:
Hi, I'm trying to call a webservice asynchronous and works. But if I enter a wrong proxy webservice.Proxy = new WebProxy("b"); I won't get a callback with an async call like webservice.addEntryAsync(entry, null); (of cource registered previously with webservice.addTrackerEntryCompleted += ).
14
23164
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
7
5616
by: christian13467 | last post by:
Hi, I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling a commandline program or a cmd file using Process.Start inside a webservice method. The call to Process.Start returns once after restarting the iis. A second call to my webservice method never returns. I found some post wich where fixed checking access rights. I added ASPNET to administrators group with no success.
1
1990
by: Cam Drab | last post by:
If this async call is running when I close the form, it appears to still be running (through the while-statement loop) even after the form.closed. In the FormClosing event I set the killedApp to true. All searches on the subject seems to be asking how to do this and no solution. There has to be a better way. Firstly, this just seems too hostile and doesn't allow for graceful exits within the called delegate. Secondly I'm not really...
1
1973
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... There are a few questions wrapped up in this, but the main one is that the WebService.MyMethodAsync() methods that are automatically generated in the client code by VS 2005 don't seem to be finishing for me. We have a VS add-in written in .net that used to make a number of database calls to fill forms. To improve security, we moved the db calls to a web service and return DataSets for the calls (the result sets are always...
0
8868
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9241
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9160
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8062
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2612
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.