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>
<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
Post a Comment