|
1 | 1 | --- |
2 | | -title: Disable debugging for ASP.NET application |
| 2 | +title: Disable Debugging for ASP.NET Application |
3 | 3 | description: This article discusses how to disable debugging for ASP.NET applications. |
4 | | -ms.date: 03/27/2020 |
| 4 | +ms.date: 03/19/2025 |
5 | 5 | ms.custom: sap:General Development |
6 | 6 | ms.topic: how-to |
7 | 7 | --- |
8 | 8 | # Disable debugging for ASP.NET applications |
9 | 9 |
|
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. |
11 | 11 |
|
12 | 12 | _Original product version:_ ASP.NET |
13 | 13 | _Original KB number:_ 815157 |
@@ -38,43 +38,48 @@ To disable debugging, add the compilation element to the *Web.config* file of th |
38 | 38 |
|
39 | 39 | ## Method 2: Modify the Machine.config file |
40 | 40 |
|
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: |
42 | 42 |
|
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: |
44 | 44 |
|
45 | | - `%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\` |
| 45 | + `%SystemRoot%\Microsoft.NET\Framework\%VersionNumber%\CONFIG\` |
46 | 46 |
|
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: |
48 | 48 |
|
49 | 49 | `%SystemRoot%\Microsoft.NET\Framework64\%VersionNumber%\CONFIG\` |
50 | 50 |
|
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`. |
53 | 53 |
|
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`: |
55 | 55 |
|
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: |
59 | 69 |
|
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."::: |
61 | 71 |
|
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: |
63 | 73 |
|
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."::: |
65 | 75 |
|
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: |
68 | 77 |
|
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. |
71 | 80 |
|
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."::: |
76 | 82 |
|
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: |
79 | 84 |
|
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."::: |
0 commit comments