weixin_33735077 2010-12-03 23:27 采纳率: 0%
浏览 27

WCF回调到AJAX?

Hi I'd like to make a simple ajax program.

I'd like to send information from the client to server.
I'd like to send information from the server to client. (Like updates every so often)

Seems simple right? But I can't find anything on this online. All the examples all for wpf talking to wcf. Or silverlight talking to wcf. But not AJAX talking to wcf. Especially when I'm talking about callbacks. not just client sending something to server.

Again, I'd like to do with in http. So ajax talks with full duplex to wcf service.

Can you point me to a tutorial? errr some information on how to do this? it sounds easy and there should be a sample out there. i'm hoping anyway.

BTW: does the client need to poll server in order to do this? and if so, doesn't it beat the purpose of using wcf? I'm thinking the client needs to poll server just so the server doesn't disconnect the client. but if that's the case why don't i just do this with .asmx.

  • 写回答

3条回答 默认 最新

  • lrony* 2010-12-03 23:32
    关注

    One way to approach this is to use a RESTful service. That way your AJAX clients can talk to your wcf service and ask for resources using URI's and http verbs for the CRUD.

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘