ASP.NET and WCF integration - Running Server.Execute Asynchronously RRS feed

  • Question

  • User2115798184 posted


    I need to run the HttpContext.Current.Server.Execute method in my ASP.NET application. This application has a WCF operation that does some processing. Currently, I am running a Server.Execute call from within my WCF operation and getting the results I would expect. However, I would like to do this asynchronously.This is where my problem comes in.

    In an error to run Server.Execute asynchronously, I tried running Server.Execute in the DoWork event handler of a BackgroundWorker. Unfortunately, this throws an error that says

    "object reference not set to an instance of an object"

    The HttpContext element is not null. I checked that. It is some property nested in the HttpContext object that appears to be null. However, I have not been able to identify why this won't work. It happens as soon as I move the processing to the BackgroundWorker thread.

    My question is, how can I asynchronously execute the Server.Execute method? Are there options beyond BackgroundWorker that will work?

    Thank you,

    Tuesday, March 30, 2010 3:48 PM

All replies

  • User-1659704165 posted


    if talking about Duplex Communcation in WCF..


    chk The above link

    But not very Sure it cannopy be use in Web Scenario...

    Because Duplex Commucation Require some Listen and u caanot Use Browser as Listerner...

    When Process is over the Server sedn the Request at Any Movement


    if talking about Async Commucation using Ajax..



    then above link may help You

    Wednesday, March 31, 2010 1:06 AM
  • User2115798184 posted

    Thank you for trying. However, this is not what I'm looking for.

    Wednesday, March 31, 2010 3:02 PM