从JavaScript呼叫WCF服务 [英] Call wcf service from javascript

查看:80
本文介绍了从JavaScript呼叫WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目中的每个人晚上都好,我称WCF服务从c#放置在localhost,并且JavaScript运行正常.但是我称从c#放置在托管服务器中的WCF服务运行正常,但是当通过Access Access错误从JavaScript调用时无法正常工作.
请通过以下方法帮助我从JavaScript调用服务的任何人
致电本地服务:

Good evening to everybody in my Project i call the WCF service placed localhost from c# and JavaScript working fine.But i call the WCF service placed in hosting server from c# working fine but not work when calling from JavaScript through Access denied error.
Please help me any one the service referenced call from JavaScript by the following method
call local service:

<asp:ServiceReference Path="http://localhost/XXXX/XXX/XXXX.svc/ajax" />
call hosting:<asp:ServiceReference Path="http://XXX/XXXX.svc/ajax" />






在此先感谢

Meganathan






thanks in advance
by
Meganathan

推荐答案

请确保可以访问其他服务器上托管的WCF,并且在JavaScript中用于访问它的URL是正确的.

调试并查看工作流程如何进行.尝试解决导致错误的特定问题.
Make sure that the WCF hosted on other server is accessible and the URL used to access it in JavaScript is correct.

DEBUG and see how the workflow is happening. Try to troubleshoot what specific issue is present causing an error.


这篇关于从JavaScript呼叫WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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