禁止Asp.Net WebService 的Test页面功能

只需要Web.Config里面添加:

<system.web>
      <webServices>
        <protocols>
          <remove name="HttpGet"/>
          <remove name="HttpPost"/>
          <remove name="HttpPostLocalhost"/>
        </protocols>
      </webServices>

一般情况下<remove name="HttpGet"/> <remove name="HttpPost"/>是machine.config默认的,不需要添加

原文地址:https://www.cnblogs.com/12taotie21/p/4237536.html