Skip to main content

Posts

Showing posts from May, 2015

Did you know appcmd commands

Did you know appcmd commandsHere are some of the cool things you can do by piping appcmd commands together in IIS.
Application Pools
1. Recycle all application pools (replace recycle with start/stop to start/stop all apppools)appcmd list apppool /xml | appcmd recycle apppool /in
2. Stop application pools with word "cheap" in it
appcmd list apppool /name:"$=*cheap*" /xml | appcmd stop apppool /in

3. Set property enable32BitAppOnWin64 to true for all apppools (Filter apppools as in 2 if needed)
appcmd list apppool /xml | appcmd set apppool /in /enable32BitAppOnWin64:true

4. Start apppools which are stopped
appcmd list apppool /state:Stopped /xml | appcmd start apppool /in

5. Recycle application pools which are used in some applications
appcmd list app /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in
appcmd list app /xml | appcmd recycle apppool /in (This might recycle one apppool multiple times)

6. Recycle apppools serving website “Default Web Site”appcmd list si…

IIS Request Filtering to block HTTP Verbs (For example Trace)

The issueRequest Filtering is a built-in security feature that was introduced in Internet Information Services (IIS) 7.0. This can be used to block specific verbs like "Trace".

When request filtering blocks an HTTP request, IIS 7 will return an HTTP 404 error to the client and log the HTTP status with a unique substatus that identifies the reason that the request was denied. Verb Denied.

HTTP SubstatusDescription404.5URL Sequence Denied404.6Verb Denied404.7File Extension Denied404.8Hidden Namespace404.1Request Header Too Long404.11URL Double Escaped404.12URL Has High Bit Chars404.13Content Length Too Large