wcf on web application

Hi

I have a generic handle .ashx page that will send request data via wcf to data server and then return data to the .ashx page.

As i try to design this .ashx page code behide. How can i avoid creating new connection to wcf server every time the .ashx page is requested?

Thanks,
JSW21Asked:
Who is Participating?
 
Gary DavisConnect With a Mentor Dir Internet SvcsCommented:
There is no reason to hold a connection from your web server to the WCF server. It just boils down to an HTTP request.

For your 2nd question, a web page can return a response to the user and continue to do processing. However, the browser will not be able to reconnect to that process since the response has been returned.

You can also fork off a thread for processing. Consider the context your prosess is running under.

You can do some tricks with cache to start up an asynchronous process periodically. What you do is stick an object (it doesn't matter what) into cache with an expiration time of when you want your process to run and set the cache expiration event to that process. The process should verify the reason it is being called if necessary (there are a few different reasons).

Gary
0
 
JSW21Author Commented:
also may be my question was to ask - is it possible to have a web application that has a part that is running similar to a server application (which will not turn on and off when page requested/close).
0
 
JSW21Author Commented:
Many thanks
0
All Courses

From novice to tech pro — start learning today.