WCF方法从Javascript调用过两次? [英] WCF method called twice from Javascript?

查看:90
本文介绍了WCF方法从Javascript调用过两次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-4下投最爱
分享[fb]分享[tw]


我从Java脚本调用WCF方法,但是该方法自动调用两次.您能解决这个问题吗?

-4 down vote favorite
share [fb] share [tw]


I am calling WCF method from java script but the method calling twice automatically. Could you please fix this issues.

PARAMETERS.load();
var service = new Hotal.Services.IMenuSearchService();
service.FindRestaurant(City, Area, onRestaurantSeachSuccess, onRestaurantSeachFailed, null);



以下方法仅调用两次:



the below method only calling twice:

public IEnumerable<Data.NewRestaurantHeader> FindRestaurant(string City, string Area)
        {
            Business.Menu menu = new Business.Menu();
            return menu.FindRestaurant(City, Area);
        }


 public IEnumerable<Data.NewRestaurantHeader> FindRestaurant(string City, string Area)
        {
            // LinQ query here
        }

推荐答案

检查此论坛
http: //www.dotnetfunda.com/articles/article912-3-ways-to-do-wcf-instance-management-per-call-per-session-and-single.aspx [
check this forum
http://www.dotnetfunda.com/articles/article912-3-ways-to-do-wcf-instance-management-per-call-per-session-and-single.aspx[^]
--NDK


这篇关于WCF方法从Javascript调用过两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆