[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3026
  • Last Modified:

IIS 8.5 HTTP Error 405.0 Method Not Allowed

I am moving a website from Server 2003 to Server 2012.  This is the page:

Partial Class Qredirect
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        For i As Integer = 0 To Request.Form.Count - 1
            Session(Request.Form.GetKey(i)) = Request.Form(i).ToString()
        Next
        Server.Transfer(Session("DestPage").ToString(), True)
    End Sub

End Class

_________________________________________________________________

This is the error page:

HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.Most likely causes:
The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.
A request was sent to the server that contained an invalid HTTP verb.
The request is for static content and contains an HTTP verb other than GET or HEAD.
A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.
 Things you can try:
Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site.
Check the IIS log file to see which verb is not allowed for the request.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
 Detailed Error Information:
Module    StaticFileModule
Notification    ExecuteRequestHandler
Handler    StaticFile
Error Code    0x80070001

____________________________________________________________________

It looks like the StaticFile handler is the problem.  I tried changing the permissions and restrictions in IIS but that hasn't worked.
0
schwientekd
Asked:
schwientekd
  • 5
  • 2
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
Make sure that the client sends a request that contains a valid HTTP method. To do this, follow these steps:

    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. On the File menu, click Open. In the File name box, type %windir%\system32\inetsrv\config\applicationhost.config, and then click Open.
    In the ApplicationHost.config file, locate the <handlers> tag.     Make sure that all the handlers use valid HTTP methods. 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.

source: http://bit.ly/1AfJv7X
0
 
Praveen Kumar BonalaCommented:
modify your web.config file with following:

 <system.webServer>
    <modules>
    <remove name="WebDAVModule" />
    </modules>
  </system.webServer>
0
 
schwientekdAuthor Commented:
Praveen,

I modified web.config and no change.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
schwientekdAuthor Commented:
David,

I am not familiar with how to make sure that all the handlers use valid HTTP methods in the applicationHost.config file.  The site works in Server 2003 so wondering if there is some IIS default in Server 2012 that is different?
0
 
Praveen Kumar BonalaCommented:
Can you please check IIS log, and let me know the error clearly from log file.
0
 
schwientekdAuthor Commented:
This is the last line in the log file.

2015-02-12 18:58:13 192.168.100.10 POST /YEQ/Qredirect.aspx - 443 - 192.168.100.69 Mozilla/5.0+(Windows+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/40.0.2214.111+Safari/537.36 https://vm-tampa/redirect/Yeq-session-redirect-qnew1.asp?PlanYear=2015 405 0 1 31
0
 
schwientekdAuthor Commented:
I got past this error by installing all options in Roles and Features | Web Server (IIS) | Web Server | Application Development.  I should have done them one by one to figure out which was missing but I think it may have been .NET Extensibility.  Now I have a different error coming up but this one seems to be resolved.
0
 
schwientekdAuthor Commented:
Figured out the problem on my own.
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now