0

I have an ASP.net webpage, that periodically (once in a minute) makes a call to my WCF REST service. My REST service responses some XML data. After getting it I make some further operations on that on server side in my ASP page.Note, this post data process in ASP is required, I can't avoid it. I know my life would be easier without this step, but I must do it.

After I'd like to pass this data in XML format to a client side javascript, that can parse it and show infos to the user based on this data. How can make this call from server side? What is the best pattern/practice to do it?

.net4/VS2010

2
  • To make sure I follow: You get the data from the WCF Web service on the client side and then pass it back to an ASP .NET Page that performs another process on this data and needs to return it back to the client? Commented Aug 25, 2011 at 20:24
  • Not exactly: WCF REST->ASP->JavaScript Commented Aug 25, 2011 at 20:50

3 Answers 3

1

if you want to call a function that already exists, that will load your data to the screen, you can tell the server to return your data and then ajax will grab that data and call a callback function. if you are not using ajax, you can reload the whole page with the new data.

Sign up to request clarification or add additional context in comments.

Comments

1

HTTP is not designed to push data from the server to the client. I'm not really familiar with ASP but usually you have the following possibilities to "push" data to a client javascript application via HTTP:

  • page reload via meta refresh (which doesn't actually push data;) )
  • periodically polling an "job queue" URL using javascript
  • comet (see http://en.wikipedia.org/wiki/Comet_(programming)) for an overview)
  • Web Sockets (which actually pushes data to the client but is only supported by newer browsers)

I've been using atmosphere (http://atmosphere.java.net/) which works pretty well in java application containers, which provides an abstraction layer over the underlying technology. I don't know if there is something similar out there in the ASP-world.

cheers Martin

Comments

1

Tom, in that case just do the following

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.