Tuesday, December 30, 2014

The requested page cannot be accessed because the related configuration data for the page is invalid

When you get this IIS error message

The requested page cannot be accessed because the related configuration data for the page is invalid

and seach on stack overflow, you will get that it is the process that cannot access the file.

That said for me it was not that.

I updated my file to contains http redirection to https. This work well for an Azure web site.
but did not work on my local machine. here is the xml configuration block that was creating the issue.
  
    <rewrite>
      <rules>
        <rule name="Redirect to https">
          <match url="(.*)">
          <conditions>
            <add input="{HTTPS}" pattern="Off">
            <add input="{REQUEST_METHOD}" pattern="^get$|^head$">
          </add></add></conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}">
        </action></match></rule>
      </rules>
    </rewrite>

I think I need to install some URL rewriting module.

No comments:

Post a Comment