Error message when a user visits a website that is hosted on a server that is running Internet Information Services 7.0: "HTTP Error 405.0 - Method not allowed"

Article translations Article translations
Article ID: 942051 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

Consider the following scenario. You have a website that is hosted on a server that is running Internet Information Services (IIS) 7.0. When a user goes to this website, the user receives an error message that resembles the following: 
Server Error in Application "application name"
HTTP Error 405.0 - Method not allowed
HRESULT: 0x80070001
Description of HRESULT
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

Cause

Cause 1

This problem occurs because the client makes an HTTP request by using an HTTP method that does not comply with the HTTP specifications.

To resolve this problem, see resolution 1.

Cause 2

This problem occurs because a client makes an HTTP request by sending the POST method to a page that is configured to be handled by the StaticFile handler. For example, a client sends the POST method to a static HTML page. However, pages that are configured for the StaticFile handler do not support the POST method.

To resolve this problem, see resolution 2.

Resolution

Resolution 1

Make sure that the client sends a request that contains a valid HTTP method. To do this, follow these steps:
  1. Click Start, type Notepad in the Start Search box, right-click Notepad, and then click Run as administrator.

    Note If you are prompted for an administrator password or for a confirmation, type the password, or provide confirmation.
  2. On the File menu, click Open. In the File name box, type %windir%\system32\inetsrv\config\applicationhost.config, and then click Open.
  3. In the ApplicationHost.config file, locate the <handlers> tag.
  4. Make sure that all the handlers use valid HTTP methods.
  5. Save the ApplicationHost.config file.

Resolution 2

Send the POST request to a page that is configured to be handled by a handler other than the StaticFile handler (for example, the ASPClassic handler). Or, change the request that is being handled by the StaticFile handler so that it is a GET request instead of a POST request.

Properties

Article ID: 942051 - Last Review: August 17, 2012 - Revision: 2.0
Applies to
  • Microsoft Internet Information Services 7.0
Keywords: 
kbexpertiseadvanced kbtshoot kbprb KB942051

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com