Skip to main content

Restrict user to access web service through browser

There is two way to restrict the user to access the web service from browser.

Method : 1

<system.web>
    <webServices>
             <wsdlHelpGenerator href="CustomPage.aspx"></wsdlHelpGenerator> /
    </webServices>
</system.web>

 We have to create CustomPage.aspx page that will redirect into when try to access service.asmx file. It is restrict the user to invoke the web method via browser. Suppose if  creating a new client application to consume the service, you could access the wsdl like Service.asmx?wsdl

Method: 2

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

Removing the documentation protocol and it won't allow us to access the WSDL like Service.asmx?wsdl

Comments

Popular posts from this blog

Install Grub Customizer in Debian based OS

Always we are looking to customize the boot menu, boot order, boot background image and changing the font & color. These things can be achieved by Grub Cusomizer in Linux. Follow the below steps to install latest version of Grub Cusomizer into Debian based OS (Kali, Parrot) Open the terminal, execute the following commands in order. 1. su - 2. apt-get install build-essential cmake libgtkmm-3.0-dev libssl-dev gettext libarchive-dev  3. wget https://launchpad.net/grub-customizer/5.0/5.0.6/+download/grub-customizer_5.0.6.tar.gz 4. tar xfv grub-customi*  5. cd grub-customizer-5.0.6 6. cmake . && make -j3  7. make install More information, Visit Grub Customizer site - https://launchpad.net/grub-customizer

How to Update Burp Suite in Kali Linux

Download the latest Jar file Navigate to /usr/bin and rename burpsuite to burpsuite(old) Copy the jar that was just downloaded into /usr/bin Right-click and rename the jar to burpsuite , and Allow executing file as program Upon successful launch, you can delete burpsuite(old) from /usr/bin.

Copy files and folders recursive in C#

This code written to copy files and folders recursively from one drive to another drive using C#, It could be physical storage, logical storage  or network location.  private static void Copy(string sourcePath, string targetPath)         {             foreach (string f in Directory.GetFiles(sourcePath))                 File.Copy(f, targetPath + "\\" + Path.GetFileName(f), true);             foreach (string d in Directory.GetDirectories(sourcePath))             {                 var dirName = Path.GetFileName(d);                 Directory.CreateDirectory(targetPath + "\\" + dirName);                 Copy(sourcePath + "\\" + dirName, targetPath + "\\" + dirName);           ...