473,770 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Asynch processing in ASP.NET

HI

Firstly, I am new to ASP.NET and struggling with the following concepts.

I have a win form which gathers information, eg date range , product code
etc. when I press a button, a request is sent to the server (using sockets)
after the request is complete, the server calls back the win form (which is
listening on the port) with the response, and the form reacts to the
response.

I wish to duplicate this using a Web page instead of a Win Form.
I can gather and validate the info OK.

After this I wish to put out a Waiting... Page, and wait for the response
from the server. When the response is received redirect to the appropriate
results page.

How do I code my waiting page to wait for the server response. ?
Also I don't want to tie up the Web server resource.? If I need to start
another thread, how do I do this. ?
What happens is the user navigates away for the Waiting.. page. ?

Any suggestion are extremely well received.

I am using VB.NET I have seen examples of asynchronous C# projects but I
don't understand them.

Regards
Tim

Nov 18 '05 #1
2 1191
"Tim Marsden" <TM@UK.COM> wrote in message
news:OF******** ******@TK2MSFTN GP11.phx.gbl...
HI

Firstly, I am new to ASP.NET and struggling with the following concepts.

I have a win form which gathers information, eg date range , product code
etc. when I press a button, a request is sent to the server (using sockets) after the request is complete, the server calls back the win form (which is listening on the port) with the response, and the form reacts to the
response.

I wish to duplicate this using a Web page instead of a Win Form.
I can gather and validate the info OK.

After this I wish to put out a Waiting... Page, and wait for the response
from the server. When the response is received redirect to the appropriate
results page.

How do I code my waiting page to wait for the server response. ?
Also I don't want to tie up the Web server resource.? If I need to start
another thread, how do I do this. ?
What happens is the user navigates away for the Waiting.. page. ?

Any suggestion are extremely well received.

I am using VB.NET I have seen examples of asynchronous C# projects but I
don't understand them.


Check out "Indicating Progress"
http://msdn.microsoft.com/library/de...pplication.asp

--
John Saunders
johnwsaundersii i at hotmail
Nov 18 '05 #2
The normal method actually fudges the process. It goes like so:

1. Write out the "waiting" code message and flush the Response
2. When you get the answer, write out a Response.Redire ct (client side) to
move the user to another page. You can also do this same effect with a
"waiting layer" and a "results layer". You show the waiting layer first and
then hide it after you paint the underlying results layer. Depending on the
browsers you are hitting (ie, do you have to target Netscape and IE versions
3).

This gets you around the fact that you cannot, without writing a hook of
some sort, talk from the server to the client except through the stream.

For longer running processes, you will have to have something on the page
that you can communicate with, as the page will time out before you finish
the response.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** ***
Think Outside the Box!
*************** *************** *************** ***
"Tim Marsden" <TM@UK.COM> wrote in message
news:OF******** ******@TK2MSFTN GP11.phx.gbl...
HI

Firstly, I am new to ASP.NET and struggling with the following concepts.

I have a win form which gathers information, eg date range , product code
etc. when I press a button, a request is sent to the server (using sockets) after the request is complete, the server calls back the win form (which is listening on the port) with the response, and the form reacts to the
response.

I wish to duplicate this using a Web page instead of a Win Form.
I can gather and validate the info OK.

After this I wish to put out a Waiting... Page, and wait for the response
from the server. When the response is received redirect to the appropriate
results page.

How do I code my waiting page to wait for the server response. ?
Also I don't want to tie up the Web server resource.? If I need to start
another thread, how do I do this. ?
What happens is the user navigates away for the Waiting.. page. ?

Any suggestion are extremely well received.

I am using VB.NET I have seen examples of asynchronous C# projects but I
don't understand them.

Regards
Tim

Nov 18 '05 #3

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

Similar topics

11
1766
by: Glen Wolinsky | last post by:
This is my first attempt as asynchronous processing. I have created a small test app as proof of concept, but I am having one proglem. In the example (code listed below), my callback routine has two problems: 1. It runs TWICE; and 2. While it seems to update the web page controls, the results never show up on the page. I am using delegates per a couple of examples I found on MSDN and elsewhere.
2
1565
by: ghost | last post by:
As the Subject indicates I have written a web page that makes use of several web service calls. Some of the web service calls are very fast so they called synchronously. Some web service calls are longer running so I call them asynch so that they can all run concurrently. The user base for the application that I am creating demands the partial response of the faster calls and a gradual update of their web page info from the balance of...
2
1098
by: Techno_Dex | last post by:
What is the correct way to debug a WS which makes it's call Asynch?
4
1878
by: EM_J | last post by:
I am implementing this interface in one of my pages. The RaiseCallbackEvent method runs a task for about 3 seconds. I've noticed when I am on that page and click a tab to navigate to another page, it may take up to 3 seconds to redirect. If I decrease the time to 500 ms, the redirect happens much faster. So it seems like this asynch task is not really asynch, since the redirect is waiting for it to complete. Am I misunderstanding...
0
1372
by: Patino | last post by:
I have a particular WS consumer application (Windows app) that was not able to read an error from the WS app because it was calling a method asynch. The client app just hangs there. But once I switched the call to a synch, the client app got the error message and displayed it nicely to the user. In this client app. the user does not have to do anything while waiting for results to come back from the web, so it makes sense to call the...
1
10037
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
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8931
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
7456
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
6710
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
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.