Skip to content

Commit 703e332

Browse files
committed
adds images
1 parent 7281b6b commit 703e332

6 files changed

Lines changed: 32 additions & 27 deletions

File tree

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Disable debugging for ASP.NET application
2+
title: Disable Debugging for ASP.NET Application
33
description: This article discusses how to disable debugging for ASP.NET applications.
4-
ms.date: 03/27/2020
4+
ms.date: 03/19/2025
55
ms.custom: sap:General Development
66
ms.topic: how-to
77
---
88
# Disable debugging for ASP.NET applications
99

10-
This article discusses how to disable debugging for ASP.NET applications (running on .Net Framework).
10+
This article discusses how to disable debugging for ASP.NET applications running on .Net Framework.
1111

1212
_Original product version:_   ASP.NET
1313
_Original KB number:_   815157
@@ -38,43 +38,48 @@ To disable debugging, add the compilation element to the *Web.config* file of th
3838

3939
## Method 2: Modify the Machine.config file
4040

41-
You can also disable debugging for all applications on a system by modifying the *Machine.config* file. To confirm debugging hasn't been enabled in the *Machine.config* file, follow these steps:
41+
You can also disable debugging for all applications on a system by modifying the **Machine.config** file. To confirm debugging hasn't been enabled in the **Machine.config** file, follow these steps:
4242

43-
1. Open the *Machine.config* file in a text editor, such as Notepad. The file is typically located in the following folder:
43+
1. Open the **Machine.config** file in a text editor, such as Notepad. The file is typically located in the following folder:
4444

45-
`%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\`
45+
`%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\`
4646

47-
or, for 64 bit versions of the .Net Framework:
47+
For 64-bit versions of the .Net Framework, the file is in the following folder:
4848

4949
`%SystemRoot%\Microsoft.NET\Framework64\%VersionNumber%\CONFIG\`
5050

51-
3. In the *Machine.config* file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to **true**.
52-
4. If the debug attribute is **true**, change the debug attribute to **false**.
51+
1. In the **Machine.config** file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to `true`.
52+
1. If the debug attribute is `true`, change the debug attribute to `false`.
5353

54-
The following code sample shows the compilation element with debug set to **false**:
54+
The following code sample shows the compilation element with debug set to `false`:
5555

56-
```xml
57-
<compilation debug="false"/>
58-
```
56+
```xml
57+
<compilation debug="false"/>
58+
```
59+
60+
1. Save the **Machine.config** file.
61+
62+
## Method 3: Using the IIS Manager Console (if the web application is hosted on IIS)
63+
64+
1. Open the IIS Manager Console on the computer where the website is hosted (you can select <kbd>Windows</kbd> + <kbd>R</kbd> and type **inetmgr**):
65+
66+
:::image type="content" source="media/disable-debugging-application/aspnet-debug-step1.png" alt-text="Screenshot of typing inetmgr in the Run window.":::
67+
68+
1. Select the website or web application for which you wish to enable or disable debug mode from the left hand side tree view:
5969

60-
5. Save the *Machine.config* file.
70+
:::image type="content" source="media/disable-debugging-application/aspnet-debug-step2.png" alt-text="Screenshot of website or web application for which you wish to enable or disable debug mode.":::
6171

62-
## Method 3: Using the IIS Manager Console (if the web-application is hosted on IIS)
72+
1. From the middle-pane of the IIS Manager console, select the **.Net Compilation** icon:
6373

64-
1. Open the IIS Manager Console on the computer where the website it hosted (you can press Windows+R key and type inetmgr.exe)
74+
:::image type="content" source="media/disable-debugging-application/aspnet-debug-step3.png" alt-text="Screenshot of the .Net Compilation icon.":::
6575

66-
<insert picture from step 1>
67-
2. Select the website or web-application for which you wish to enable or disable debug mode from the left hand side tree view
76+
1. Within the list of parameter values displayed in the center pane of the IIS Manager, set the value of **Debug** under the **Behavior** category to:
6877

69-
<insert picture from step 2>
70-
3. From the middle-pane of the IIS Manager console, select the '.Net Compilation' icon
78+
- **true**: Enable debug mode.
79+
- **false**: Disable debug mode.
7180

72-
<insert picture from step 3>
73-
4. Within the list of parameter values displayed in the center pane of the IIS Manager set the 'Debug' parameter under the 'Behavior' category to:
74-
**true** if you wish to enable debug mode
75-
**false** if you wish to disable debug mode
81+
:::image type="content" source="media/disable-debugging-application/aspnet-debug-step4.png" alt-text="Screenshot of.":::
7682

77-
<insert picture from step 4>
78-
5. Select the 'Apply' button from the right-hand side pane of the IIS manager console to persist the changes to the IIS configuration
83+
5. Select the **Apply** button from the right-hand side pane of the IIS manager console to persist the changes to the IIS configuration:
7984

80-
<insert picture from step 5>
85+
:::image type="content" source="media/disable-debugging-application/aspnet-debug-step5.png" alt-text="Screenshot of the Apply button in IIS Manager.":::
10.8 KB
Loading
117 KB
Loading
118 KB
Loading
64.2 KB
Loading
77.6 KB
Loading

0 commit comments

Comments
 (0)