Article
Mobile bug report - Error HTTP 405.0 - Method Not Allowed The page you are looking for cannot be displayed because an invalid method is used (HTTP command)
15:47 Aug 03, 2018
Question
Regarding the error when working with the mobile version of the application:
HTTP Error 405.0 - Method Not Allowed. The page you are looking for cannot be displayed because an invalid method is used (HTTP command).
Full bug report:
Type: Terrasoft.ServerException
Message: Request for server returned error
<legend> Most likely reasons: </ legend> \ n <ul> \ t <li> The request sent to the web server used the HTTP command that was not allowed by the module configured to process the request. </ li> \ t < li> A request was sent to the server containing an invalid HTTP command. </ li> \ t <li> This request for static content contains an HTTP command other than GET and HEAD. </ li> \ t <li> The request was sent to the virtual directory using the HTTP POST command; meanwhile, the default document is a static file that is not compatible with HTTP commands other than the GET and HEAD. </ li> </ ul> \ n </ fieldset> \ n </ div> \ n <div class = \ "content-container \"> \ n <fieldset> <legend> What can be done: </ legend> \ n <ul> \ t <li> Check the list of commands activated for the module handler with this request and ensure that this command can easily reach the website. </ li> \ t <li> View the IIS log file and determine which command cannot be used in the request. </ li> \ t <li> Create a trace rule to track failed requests for this HTTP status code. For more information about creating a trace rule for failed requests, click Most likely causes: The request sent to the web server used the HTTP command that was not allowed by the module configured to process the request. A request was sent to the server containing an invalid HTTP command. This static content request contains an HTTP command other than GET and HEAD. A request was sent to the virtual directory using an HTTP POST command; meanwhile, the default document is a static file that is not compatible with HTTP commands other than the GET and HEAD. Possible solutions: Check the list of commands activated for the module handler where this request was sent, and make sure that this command can reach the website. Review the IIS log file and determine which command cannot be used in the request. Create a trace rule to track back requests for this HTTP status code. For more information on creating a trace rule for failed requests, click here.
Solution
This error may occur due to incorrect IIS settings on the server.
To fix this, add the following code to the web.config file:
<system.webServer> <modules> <remove name="WebDAVModule" /> </modules> <handlers> <remove name="WebDAV" /> </handlers> </system.webServer>