远程访问Java中的Webserivce [英] Remotly Access Webserivce in Javascript

查看:53
本文介绍了远程访问Java中的Webserivce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我尝试使用JavaScript进行Web服务访问.我在本地计算机上创建了一个Web服务(c#),通过javascript访问它工作正常,但是当我尝试通过远程webservice访问它时出现了问题.首先,当我们尝试在浏览器url中访问时,远程Web服务会给出此消息
测试表单仅适用于来自本地计算机的请求." .

其次,当我通过javascript访问远程服务时,它会给我此消息

服务器上发生了应用程序错误.此应用程序的当前自定义错误设置阻止远程查看该应用程序错误的详细信息(出于安全原因).但是,本地运行的浏览器可以查看该错误.服务器计算机"

即使我在浏览器URL上直接访问Webservice时,我的本地webservice都提供了 Invoke 按钮,但是远程webserice却不提供任何内容"

请帮助我我做错了&我该怎么做才能摆脱这个问题

请原谅我的英语"


问候,

Raghav Sharma

Hello Everyone,
I trying to work with web service access in JavaScript. I create a webservice(c#) in my local machine & access through javascript it working fine but when i try to access it through remotely webservice then problem occured. First the remotely webservice give this message when we try to access in browser url
"The test form is only available for requests from the local machine." .

Second when i access remote service through javascript then it give me this message

"An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine"

"Even my local webservice provide Invoke button when i access webservice direct at browser url but remote webserice provide nothing"

Please help me what i am doing wrong & what i have to do to get rid from this problem

"Please pardon from my english"


With Regards,

Raghav Sharma

推荐答案

您可以在web.config中启用测试表单:
You can enable the test form in you web.config:
<webServices>
   <protocols>
     <add name="HttpGet"/>
     <add name="HttpPost"/>
   </protocols>
 </webServices>



出于安全原因,默认情况下将其禁用.



It''s disabled by default for security reasons.


这篇关于远程访问Java中的Webserivce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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