> 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/da/knowledge-base/troubleshooting-articles/failed-request-tracing-with-iis/configuration.md).

# Konfiguration

Forklarer, hvordan sporing af mislykkede anmodninger konfigureres i IIS for Devolutions Server med kommandolinjeværktøjet appcmd eller grænsefladen i IIS Manager.

Der er to metoder til at konfigurere sporingen af mislykkede anmodninger:

* [Brug af kommandoen appcmd.exe](#using-the-appcmd.exe-command)
* [Via appen IIS Manager](#via-the-iismanager-app)

### Brug af [kommandoen 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" %}
Bemærk, at trinnene ovenfor kun gælder for IIS 7.0 eller nyere, og at kommandoerne fungerer bedst, når cmd.exe køres som administrator.
{% endhint %}

### Via appen IIS Manager

1. Udvid rodknuden i IIS Manager, udvid ***Websteder***, og vælg derefter ***Standardwebsted***.
2. Vælg ***Sporing af mislykkede anmodninger*** i ruden ***Handlinger*** til højre.
3. Markér feltet ***Aktivér*** (obligatorisk). Målet ***Mappe*** og indstillingen ***Højeste antal sporingsfiler*** kan tilpasses (valgfrit). Klik på ***OK***, når De er færdig.
4. Udvid ***Standardwebsted***, og vælg derefter det websted, der skal spores.
5. Dobbeltklik på ikonet ***Regler for sporing af mislykkede anmodninger*** for det valgte websted.
6. Klik på ***Tilføj*** i ruden ***Handlinger*** til højre for at tilføje en ny regel.
7. Vælg ***Alt indhold (*****)**\*, og klik derefter på ***Næste***.
8. Markér feltet ***Statuskode(r)***, og angiv derefter den type statuskode, der skal spores. I dette tilfælde er ***Statuskode(r)*** angivet til at overvåge alt fra kode 400 til 599. Klik på ***Næste***, når De er færdig.
9. Vælg udbyderne af sporingen. For hver udbyder skal De angive ***Detaljeringsgrad*** til ***Udførlig*** og vælge alle ***Områder***. I dette tilfælde blev udbyderen ***WWW Server*** valgt.
10. Klik på ***Udfør***. Sporingsreglen er nu defineret.


---

# 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/da/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.
