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

  • Question

  • User2115798184 posted

    Hello,

    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

    Hi,

    if talking about Duplex Communcation in WCF..

    http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,b891610a-6b78-4b54-b9a6-4ec81c82b7c0.aspx

    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

    OR

    if talking about Async Commucation using Ajax..

    http://www.asp.net/ajax/documentation/live/Overview/AsynchronousLayerOverview.aspx

    http://www.asp.net/AJAX/Documentation/Live/Tutorials/ConsumingWebServicesWithAJAXTutorial.aspx

    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