I have the following code in a web.config file of the default IIS site.
Add the following to the virtual directory's web.config file: