The way to do this is to use the unique session identifier associated with the Http session. From the description it seems that you might need to combine this into one instance of HttpApplication, but this is optional (you can also continue the session in many instances of the application). In any case, this session identifier must be bound in some way to each Http request (either using a cookie, querystring, a static variable with an HttpApplication instance, form data). Then you save the Http session credentials somewhere with an identifier.
This identifying information may vary depending on your needs, but may entail an entire HTTP request or just some truncated view that serves your specific purpose.
Using this SessionID somewhere in the Http request allows you to recover any information needed to call and interact with the corresponding services. Service instances can also be session bound.
Basically, I suggest that you NOT directly pass the Http connection to the external process, but instead pass the necessary data to the external process and allow you to create a mechanism for sending callback data. I think that studying the mediator template can help you understand that I I mean here. http://en.wikipedia.org/wiki/Mediator_pattern . Hope this helps.
source share