iis disable debug

In IIS to disable debug do the following.

Modify the Web.config File

  1. Open the Web.config file in a text editor such as Notepad.exe. Web.config file is typically located in the application directory.
  2. Modify the compilation element and set debug=”false”

    <compilation 
        debug="false"
    />
    
  3. Save the Web.config file. The ASP.NET application automatically restarts.

Modify the Machine.config file

  1. Open the Machine.config file in a text editor such as Notepad.exe. The Machine.config file is typically located in the following folder:

    %SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\
    
  2. In the Machine.config file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to true.

  3. If the debug attribute is true, change the debug attribute to false.

    <deployment retail="true" />
    
  4. Save the Machine.config file.

  • Test if Debug is really off
  1. Use curl to test if debug is on or off

    curl -k -H "Command: stop-debug" -X DEBUG <some url>
    

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>