locked
How to hide the directories in Web API service url while browsing RRS feed

  • Question

  • User-56077080 posted

    Hi Everyone,

    while browsing the API Service url, it's showing all the files, folder and config files. How to not display those directories while browsing the url. Instead of getting directories, I need like below,

    This page is used by Azure Server

    Wednesday, January 17, 2018 8:13 AM

All replies

  • User283571144 posted

    Hi Lawce,

    while browsing the API Service url, it's showing all the files, folder and config files. How to not display those directories while browsing the url. Instead of getting directories, I need like below,

    This page is used by Azure Server

    According to your description, I guess you have enable the directory browsing in the iis.

    If you used azure VM server to host your web application. I suggest you could follow below steps to disable the  directory browsing.

    1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
    2. In Features View, double-click Directory Browsing.
    3. In the Actions pane, click Enable if the Directory Browsing feature is disabled and you want to enable it. Or, click Disable if the Directory Browsing feature is enabled and you want to disable it.

    Image:

    If you use azure web app, you could try to change the web config setting as below:

    <configuration>
     <system.webServer>
       <directoryBrowse enabled="false"/>
     </system.webServer>
    </configuration>

    Best Regards,

    Brando

    Thursday, January 18, 2018 3:01 AM
  • User-56077080 posted

    ok thanks for your reply. I will check and change, Have one question ?. How to give this name? "This page is used by Azure Server"

    Thursday, January 18, 2018 4:40 AM
  • User283571144 posted

    Hi Lawce,

    ok thanks for your reply. I will check and change, Have one question ?. How to give this name? "This page is used by Azure Server"

    According to your description, I suggest you could try to edit the custom error page in the IIS.

    Please follow below steps:

    1.Open the error page feature.

    2.Set the right path to the error page:

    Best Regards,

    Brando

    Friday, January 19, 2018 7:18 AM