HTTP Request Tracing Viewer and File Explorer Enhancements
Via Microsoft IIS Administration Preview 1.0.39
The Microsoft IIS Administration API is making IIS administration simpler than ever before. If you are unfamiliar with the API, check out our earlier post for an introduction.
Our previous release of the Microsoft IIS Administration API introduced the file system API along with an update to the UI at manage.iis.net. This new API has allowed users to remotely manage the content on their servers necessary for their web sites to operate. With the newest release of the API we wanted to improve upon HTTP Request Tracing, a feature of IIS that is very valuable when diagnosing performance and behavioral issues. We also went further with the file UI by adding a central file explorer that is not tied down to a web site. In addition to the central file explorer, we have integrated a text editor into manage.iis.net that allows editing of files on the server. The editor is a perfect tool for quick edits to a web.config or static files.
HTTP Request Traces
HTTP Request Tracing is a feature of IIS that allows trace files to be collected for requests that meet a configured criteria. We have enhanced the HTTP Request Tracing API and provided a traces endpoint that provides metadata for the traces collected from the feature. We also added documentation for the new API endpoint.
Note: The IIS request tracing feature is not enabled by default. Our next release of the API will enable the installation and uninstallation of optional IIS features. For this release, request tracing can be enabled in Control Panel > Programs > Turn Windows Features On Off, or with the following PowerShell command.
Enable-WindowsOptionalFeature -Online -FeatureName "IIS-HttpTracing"
Request Trace API /api/webserver/request-tracing/traces/{trace-id}
{
"id": "{trace-id}",
"url": "http://localhost:80/ ",
"method": "GET ",
"status_code": "200 ",
"date": "2017-03-07T16:18:21.6245559-08:00 ",
"time_taken": "32 ",
"process_id": "2604 ",
"activity_id": "{8000000B-0001-FE00-B63F-84710C7967BB} ",
"file_info": {
"name": "fr000001.xml ",
"id": "{file-id}",
"type": "file ",
"physical_path": "C:\\inetpub\\logs\\FailedReqLogFiles\\W3SVC1\\fr000001.xml "
},
"request_tracing": {
"id": "ASPUCsVBB45y6a748y7brQ ",
"scope": "Default Web Site/ "
}
}
Http Request Tracing UI
Alongside the HTTP Request Tracing API changes, we enhanced the UI at manage.iis.net. With the new API endpoint we can display information regarding all the trace logs that have been collected for a web site. Clicking on a trace will open the log in a new tab allowing for quick selecting and viewing.
File UI Enhancements
The web UI at has been updated to take more advantage of the features offered by the Microsoft IIS Administration API. The new additions to the UI include a File Editor and a central file explorer.
File Editor
In the previous version of the file UI, clicking on a folder would navigate into the folder and clicking on a file would do nothing. With the new update, clicking on a file will now update the file for editing. Only text files are supported for editing. When a file is opened, a built in editor will appear that can be used to modify the file and also view a diff of the editor's version of the file and the server version.
Central File UI
In the previous version of the UI users were restricted to viewing files that belonged to a web site. The new update brings a central file UI that can be used to browse any path on the file system as long as permission is granted bythe API that the user is connected to. The central file UI has a virtual root folder that is populated by the file system location's specified in the settings of the API. The name of the folders in the virtual root folder is the alias as specified in the API's configuration, and if no alias is provided then it is simply the folder name.
Given the following file settings (appsettings.json)
"files": {
"locations": [
{
"alias": "",
"path": "%systemdrive%\\inetpub",
"claims": [
"read",
"write"
]
},
{
"alias": "Debug",
"path": "%systemdrive%\\applications\\testing",
"claims": [
"read",
"write"
]
}
]
}
The following will display at the root of the central file UI.