Skip to content

Commit

Permalink
Update Rule “httphandlers-sections-in-webconfig-must-contain-a-clear-…
Browse files Browse the repository at this point in the history
…element/rule” (#6205)

* Update Rule “httphandlers-sections-in-webconfig-must-contain-a-clear-element/rule”

* Update rule.md

* Update rule.md

---------

Co-authored-by: Tiago Araújo [SSW] <[email protected]>
  • Loading branch information
ncn-ssw and tiagov8 authored Aug 1, 2023
1 parent 1742c4c commit 3ea6527
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
---
type: rule
archivedreason:
title: Do you know that 'httpHandlers' or 'httpModules' sections in web.config must contain a 'remove' or 'clear' element?
guid: 14359e59-b047-4e0b-aef5-f79ccd3eb373
title: Do you know 'httpHandlers' or 'httpModules' sections in web.config must contain a 'remove' or 'clear' element?
uri: httphandlers-sections-in-webconfig-must-contain-a-clear-element
created: 2013-02-06T12:55:03.0000000Z
authors:
- title: Adam Cogan
url: https://ssw.com.au/people/adam-cogan
- title: Danijel Malik
url: https://ssw.com.au/people/danijel-malik
- title: Adam Cogan
url: https://ssw.com.au/people/adam-cogan
- title: Danijel Malik
url: https://ssw.com.au/people/danijel-malik
related: []
redirects:
- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove3f3f3f-or-a-clear-element
- https-rules-ssw-com-au-do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-clear-element

- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove3f3f3f-or-a-clear-element
- https-rules-ssw-com-au-do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-a-clear-element
- do-you-know-that-httphandlers-or-httpmodules-sections-in-web-config-must-contain-a-remove-or-clear-element
created: 2013-02-06T12:55:03.000Z
archivedreason: null
guid: 14359e59-b047-4e0b-aef5-f79ccd3eb373
---

If web.config contains a &lt;httpHandlers&gt; or &lt;httpModules&gt; section, that section must contain a &lt;remove... /&gt; or a &lt;clear /&gt; element.
If web.config contains a `<httpHandlers>` or `<httpModules>` section, that section must contain a `<remove... />` or a `<clear />` element.

This basically forces developers to explicitly enable inheritance in nested virtual directories. In 99% of cases this developers won't use inheritance on these two sections, however it causes issues when somebody wants to add a module or handler to the parent virtual directory.

Expand All @@ -40,7 +39,7 @@ This basically forces developers to explicitly enable inheritance in nested virt
<system.web>
</configuration>
```
:::
::: bad
Figure: Bad example
:::

Expand All @@ -59,6 +58,6 @@ Figure: Bad example
<system.web>
<configuration>
```
:::
::: good
Figure: Good example
:::

0 comments on commit 3ea6527

Please sign in to comment.