Solved

wcf on web application

Posted on 2011-03-12
3
257 Views
Last Modified: 2012-06-27
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,
0
Comment
Question by:JSW21
  • 2
3 Comments
 

Author Comment

by:JSW21
ID: 35116613
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
 
LVL 18

Accepted Solution

by:
Gary Davis earned 500 total points
ID: 35118026
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
 

Author Closing Comment

by:JSW21
ID: 35455797
Many thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows shortcut location resolution on double click open 4 47
Why use this lambda? 12 60
Need to sort columns in DataGridView 4 36
ASP.NET data base connection 35 27
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question