> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/fr/knowledge-base/troubleshooting-articles/failed-request-tracing-with-iis/configuration.md).

# Configuration

Explique comment configurer le suivi des requêtes ayant échoué dans IIS pour Devolutions Server à l'aide de l'outil de ligne de commande appcmd ou de l'interface du gestionnaire IIS.

Il existe deux méthodes pour configurer le suivi des requêtes ayant échoué :

* [Utiliser la commande appcmd.exe](#using-the-appcmd.exe-command)
* [Via l'appli IISManager](#via-the-iismanager-app)

### Utiliser la [commande appcmd.exe](https://docs.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-appcmdexe)

|                                                                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| appcmd.exe set config -section:system.applicationHost/sites "/\[name='Default Web Site'].traceFailedRequestsLogging.enabled:True" /commit:apphost                                           |
| appcmd.exe set config -section:system.applicationHost/sites "/\[name='Default Web Site'].traceFailedRequestsLogging.maxLogFiles:10" /commit:apphost                                         |
| appcmd.exe set config -section:system.applicationHost/sites "/\[name='Default Web Site'].traceFailedRequestsLogging.directory:%SystemDrive%\inetpub\logs\FailedReqLogFiles" /commit:apphost |
| appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /+"\[path='\*']"                                                                             |
| appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /+"\[path='\*'].traceAreas.\[provider='WWW Server',areas='Rewrite',verbosity='Verbose']"     |
| appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /\[path='\*'].failureDefinitions.statusCodes:"400-599"                                       |

{% hint style="info" %}
Notez que les étapes ci-dessus ne s'appliquent qu'à IIS 7.0 ou version ultérieure, et que les commandes fonctionnent mieux lorsque cmd.exe est exécuté en tant qu'administrateur.
{% endhint %}

### Via l'appli IISManager

1. Dans le gestionnaire IIS, développez le nœud racine, développez ***Sites***, puis sélectionnez ***Default Web Site***.
2. Dans le volet ***Actions*** à droite, sélectionnez ***Failed Request Tracing***.
3. Cochez la case ***Enable*** (obligatoire). La cible ***Directory*** et les options ***Maximum number of trace files*** peuvent être personnalisées (facultatif). Cliquez sur ***OK*** lorsque vous avez terminé.
4. Développez ***Default Web Site***, puis sélectionnez le site web à suivre.
5. Double-cliquez sur l'icône ***Failed Request Tracing Rules*** du site web sélectionné.
6. Dans le volet ***Actions*** à droite, cliquez sur ***Add*** pour ajouter une nouvelle règle.
7. Sélectionnez ***All content (*****)**\*, puis cliquez sur ***Next***.
8. Cochez la case ***Status Code(s)***, puis saisissez le type du code de statut à suivre. Dans ce cas, les ***Status code(s)*** sont configurés pour surveiller tout ce qui va des codes 400 à 599. Cliquez sur ***Next*** lorsque vous avez terminé.
9. Sélectionnez les fournisseurs du suivi. Pour chaque fournisseur, réglez ***Verbosity*** à ***Verbose*** et sélectionnez tous les ***Areas***. Dans ce cas, le fournisseur ***WWW Server*** a été sélectionné.
10. Cliquez sur ***Finish***. La règle de suivi est maintenant définie.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/server/fr/knowledge-base/troubleshooting-articles/failed-request-tracing-with-iis/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
