Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 与wcf服务通信的网页_Vb.net_Wcf_Service - Fatal编程技术网

Vb.net 与wcf服务通信的网页

Vb.net 与wcf服务通信的网页,vb.net,wcf,service,Vb.net,Wcf,Service,我有一个计划,将作为一个应用程序(处理大部分工作)在一台计算机上运行,但主界面将基于浏览器,并可从网络上的任何计算机访问。与或类似,它们的服务器应用程序具有基于web的UI,任何人都可以访问 到目前为止,我的服务器应用程序中有一个WCF服务库(用vb.net编写)。如何使网页“对话”(发送数据)到服务?我需要使用jscript还是应该使用其他东西?这取决于wcf端点的公开方式。但一般来说,一个好的解决方案是使用ajax。类似这样的内容(使用): var json = { "test": "tes

我有一个计划,将作为一个应用程序(处理大部分工作)在一台计算机上运行,但主界面将基于浏览器,并可从网络上的任何计算机访问。与或类似,它们的服务器应用程序具有基于web的UI,任何人都可以访问


到目前为止,我的服务器应用程序中有一个WCF服务库(用vb.net编写)。如何使网页“对话”(发送数据)到服务?我需要使用jscript还是应该使用其他东西?

这取决于wcf端点的公开方式。但一般来说,一个好的解决方案是使用ajax。类似这样的内容(使用):

var json = { "test": "test" }; 
$.ajax({
    type: "GET",
    url: "YourWCF.svc/Method",
    data: json,
    processData: true,
    contentType: "application/json",
    timeout: 10000, 
    dataType: "json", 
    cache: false,
    success: function (data) { //Successfull callback
    }
});