Fixing “IIS Metabase is required to install Microsoft UrlScan Filter v3.1”

If you are looking to remove the server header from your IIS, you will need to install URL Scan to be able to go through the settings.

UrlScan is a security tool used to restrict types of HTTP requests that IIS will process. It is a simple tool which is very helpful in blocking harmful requests to the server. It seemingly supports only IIS 5.1, IIS 6.0, and IIS 7.0 on Windows Vista and Windows Server 2008. It has been deprecated since IIS 7.5 and IIS 8. It is said that Microsoft has included the features of UrlScan in request filtering option for IIS 7.5 and IIS 8. But it definitely is not a match for the simplicity of UrlScan. Today I am going to show you how to configure UrlScan in IIS 7.5 and IIS8. (IIS 7.5 is available in Windows server 2008 R2 and IIS 8 is available in Windows Server 2012 and Windows 8 ).

Install the URLScan in your machine. Please follow the following link for that

http://www.iis.net/downloads/microsoft/urlscan

When you are trying to install it on a new server, you might get an error saying:

IIS Metabase is required to install Microsoft UrlScan Filter v3.1

To fix this issue:

  1. Open Web Platform Installer
  2. Search for metabase and install “IIS: IIS 6 Metabase Compatibility”
  3. Then, select IIS ISAPI Filters. (ISAPI filters may already be installed in IIS 7.5 )
  4. Click on Install. You are shown a review of components you selected to install. Click on I accept.
  5. The components are installed and will show you a Finish screen. Click on Finish.
  6. To check installation, go in IIS and click on your server node.
  7. Click on ISAPI filters under IIS

After installing URLScan, open the URLScan.ini file typically located in the %WINDIR%\System32\Inetsrv\URLscan folder. After opening it, search for the key RemoveServerHeader . By default it is set to 0, but to remove the Server header, change the value to 1.

Doing so will remove the Server header Server: Microsoft-IIS/7.5 (8) from the User mode response.

Advertisements

How to create a redirect from non-www to www for IIS 7.0+

If you have IIS 7 installed with the web redirection module, you can use the following snippet to redirect http:// to http://www with one simple rule added to your system.webServer web.config section.

<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
    <add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />

If you have a https website to contend with and you need all the traffic to go to the https version, use:

<rewrite>

  <rules>
    <rule name="Redirect to www" stopProcessing="true">
      <match url="(.*)" />
      <conditions trackAllCaptures="false">
        <add input="{HTTP_HOST}" pattern="^domain.com$" />
      </conditions>
      <action type="Redirect"
        url="{MapProtocol:{HTTPS}}://www.domain.com/{R:1}" />
    </rule>
  </rules>
  <rewriteMaps>
    <rewriteMap name="MapProtocol">
      <add key="on" value="https" />
      <add key="off" value="http" />
    </rewriteMap>
  </rewriteMaps>
</rewrite>

IIS and Windows 8 – How to Install

One of the first things Web Developers using ASP.NET will want to install on Windows 8 is IIS (Internet Information Services). Windows 8 ships with a new version of IIS, version 8, lets take a look at installing it.

Installing IIS

Keeping with Microsoft modular design of, uhm, everything these days, IIS in Windows is still an optional “Windows Feature”. To install it, press the Windows + R key combination to bring up a run box, then type appwiz.cpl and press enter.

This will open the Program and Features part of Control Panel, on the left hand side click on the “Turn Windows features on or off” link.

Now click on the Internet Information Services check box.

If you’re a developer you are going to want to expand it and explore the sub-components as well. By default it installs all the stuff needed to host a website, and you are probably going to need some of the more developer centric components as well.

After clicking OK, this dialog will appear on your screen for a while.

When its done, fire up your browser and navigate to localhost.

That’s all there is to it.