Disable .asmx file direct browse

1) Add  below configuration  in web.config file

<system.web>
    <webServices>
             <wsdlHelpGenerator href="Deny.aspx"></wsdlHelpGenerator> // You need to create this page (simple aspx/htm to show to users)
    </webServices>
</system.web>



OR

2)
<system.web>
<webServices>
    <protocols>
         <remove name="HttpPost" />
         <remove name="HttpGet" />
        <remove name="Documentation"/>
    </protocols>
</webServices>
</system.web>

Comments

Popular posts from this blog

Convert HtmlToPDF in ASP.net & iTextshrap

Create Pivot Table In C#

How to Display Page Wise Total Amount & Grand Total Amount in Last page SSRS & RDLC Report