How to resolve the Web Service - Invoke button missing?

一位继承了Web服务的开发者在进行季度性更改后遇到了Invoke按钮消失的问题。该服务用于清除服务器缓存,且只能从本地机器进行请求。通过修改web.config文件中的webServices protocols配置,可以重新启用远程机器的调用权限。

Hi. I've inherited a Web Service from a developer who is no longer
here. One of the purposes of the service was to clear the cache on the
server side. Up until a few days ago, it worked fine - I'd open up the
service from my browser, select the appropriate function from the list,
click the Invoke button and all worked well. One of the things I do
each fiscal quarter is to make a change to the service, so it will
return the correct fiscal year and quarter. It is hard-coded. Yes, I
know...it should have been in a table. But, that's the way it works
and what I have to deal with. Anyway, I made the latest change and the
Invoke button has disappeared. I'm sure I did something, but not sure
what.

Before this started to not work, there was a message that said, "To
test the operation using HTTP POST protocal, click the 'Invoke'
button.' Now it says "The test form is only available for requests
from the local machine." I suppose I could go to our web server and
invoke it there when I need to, but I'd rather not.

I don't have any real experience with Web Services and how they work,
or even know any C# code (which is what it was written in), other than
to be able to read it a little bit. Does anyone have any suggestions
as to what I might look for to determine the cause of a missing Invoke
button?
-------------------------------------------------------------------------------------

Below is the answer

---------------------------------------------------------------------------------------

you need to explicitly enable whatever protocols are to be allowed from a
remote machine in the web.config (There are additional entries beyond what is
shown below):


<?xml version="1.0" encoding="utf-8"?>
<configuration>
... <system.web>
...
<webServices>
<protocols>
<add name="HttpPost" />
<add name="HttpGet" />
</protocols>
</webServices>
...
</system.web>
</configuration>

--

转载于:https://www.cnblogs.com/Jayan/archive/2010/04/07/1706484.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值