Sunday, January 04, 2015

Solved: Facebook App throws error: HTTP verb used to access this page is not allowed

Problem:
"HTTP verb used to access this page is not allowed"

Solution:
If you are getting the above error message on your Facebook App page, probably you are trying to access a static html page on your server. Rename the html page to server side extension (aspx / php).

How to force redirect all HTTP requests to HTTPS in IIS through Web.Config setting?

Web.config configuration setting to force redirect all http requests to https with all query string parameters in IIS 7.5 / 8.0 on Windows Servers.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Redirect to https" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Notes:

  1. The above solution will work well with all hosts including shared hosting servers
  2. Ensure your https URL is functioning properly