Your application should create and start a thread. At the time the stream is created, HttpContext.Current should be accessible, save the important part of the important web address and either go to the constructor of your object that wraps the streaming functions, or if you do not have a custom object, save it in a place where the stream can receive access to it. You will need to enter a critical section with a lock () {} if you use the latter approach.
source
share