Shuttling requests from a posted ASP.NET query string to a local Windows process and returning results

Go To


The model that I am currently developing involves three elements:

  1. A client application with a (rather) rich GUI
  2. An ASP.NET/IIS web server
  3. And a local (in regard to #2) Windows process (console application)

In my mind, the client application (#1) posts a query string to the ASP.NET/IIS web server (#2), which informs the local Windows process (#3) of the query parameters, executes the desired function, and returns the data to #2 then that to #1.

The necessity of such a (seemingly) convoluted procession arises from the nature of the Windows process. This console application uses RPC to connect and authenticate itself against a second server. As you can imagine, this process is expensive.

If I merge the Windows process and ASP.NET/IIS page, then a new connection is opened with every request. This is hardly reasonable if dozens of POSTs are made in quick succession, since each authentication case takes about four seconds.

Fortunately, the Windows console application can login once and maintain the session. Therefore, I must find a solution to interface with this console application, given the the source of any interaction will derive from an ASP.NET/IIS page.

I've read nearly every post on Stackoverflow/MSDN concerning topics encompassing this issue. I know that I can employ remoting, pipes, sockets, WCF, etc.

So I ask all of you: If you've encountered a similar issue, how did you solve it? I'm merely asking for a definitive point in the correct direction. If you can include code, I'll appreciate your response even more.

Thank you very much for any and all help.

2012-04-04 04:40
by Joshua Jones
Sounds like you need queue to serialize the requests - ggonsalv 2012-04-04 05:40
The requests are serialized by the client and 100% successfully received by the ASP.NET/IIS web server. The problem lays in passing the requests to the console application. Thanks for the suggestion - Joshua Jones 2012-04-04 06:43
Why the indirection with ASP.NET/IIS server? Can't the rich GUI call the console application directly - ggonsalv 2012-04-04 12:18
@ggonsalv Honestly, I tried using TCP sockets, but my server is over protective, even with the firewall disabled, so no listening ever goes on. So I settled for using requests like which should return Json formatted results about 1KB in size. I figure HTTP requests are more API-like and "robust". The GUI/server combo works, and the server/server combo works, I'm just stuck making 2 local pieces communicate with each other - Joshua Jones 2012-04-04 15:28