ASP.Net Web服务-通过任何方式禁用“测试/调用"功能部分? [英] ASP.Net web service - any way to disable the "Test/invoke" section?

查看:53
本文介绍了ASP.Net Web服务-通过任何方式禁用“测试/调用"功能部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的Web服务页面的顶部删除测试...调用"部分(部分原因是测试"一词可能使用户错误地认为他们在单击产品时并未执行生产中的某些操作!),但仍允许API用户使用HTTPGET/POST.

I want to remove the "Test... Invoke" section from the top of my web service pages (partly because the word 'test' may make users mistakenly think they are not executing something in production when they click it!), but still allow HTTPGET/POST for API users.

有什么想法吗?

推荐答案

尝试在Web.Config中添加关注文本(我检查了它-在我的测试用例中可以正常工作)

Try add follow text in Web.Config (I checked it - in my test-case it works)

<system.web>
   <webServices>
        <protocols>
          <remove name="Documentation" />
        </protocols>
   </webServices>
</system.web>

http://msdn.microsoft.com/en-us/library/2tyf2t8t.aspx

这篇关于ASP.Net Web服务-通过任何方式禁用“测试/调用"功能部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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