Welcome again to out IIS video tutorials,
In this episode I will talk about other IIS options that we haven’t discussed like IIS default document and directory browsing, IIS limits, error pages and how you can customize them, how can you view the worker processes that run on the web server and also the requests, compression mechanisms and other options with whom you can customize the web server behavior. This tutorial takes you deeper into Internet Information Services features, I hope you will enjoy it.
Before you start watching the video tutorial, I will note and describe a little bit some things that we will talk about:
Default document – This is basically the first page that is displayed when you access a page. IIS lets you customize for what basic documents to look for and also in which order.
appcmd.exe set config “Website1” /section:defaultDocument /enabled:true /+files.[value=’Web.html’]
This command sets the default document of the Website1 to be Web.html.
Directory browsing it is used when you allow users to view the contents of your website directory when no default webpage is found. In the video I have changed the properties of this option by using the IIS management console but this option can also be changed in command prompt by typing the following:
appcmd.exe set config /section:directoryBrowse /enabled:true|false
By default this option is set to true which means that directory browsing is enabled, if this is changed to false than this option becomes unavailable.
Compression mechanisms are used to use the bandwidth more efficient. There are two compression methods in IIS, static and dynamic compression:
Static compression – If you select this option IIS will compress the static content and will keep it in a directory specified. This is helpful when you have multiple users requesting the same static elements because IIS will give the the copy of the compressed file that is already cached and so reducing the bandwidth. Use this option with static files like html, .doc , pdf, .txt etc.
appcmd.exe set config -section:system.webServer/httpErrors /+”[statusCode=’404′,subStatusCode=’5′,prefixLanguageFilePath=’%SystemDrive%\inetpub\custerr’,path=’404.5.htm’]” /commit:apphost