Mike J
Mike J

Reputation: 425

IIS 7.5, 405 - HTTP verb used to access this page is not allowed

405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.

Running on Windows 7, IIS 7.5.
Front end: Angular 1.x
Back end: CodeIgniter (PHP)
Structure:
assets/
bower_components/
admin/
service/
->application/
->system/
->index.php
->web.config
index.html
web.config

Getting an error when trying to run a method within the /service CodeIgniter project (/service/page/index).

All the possible solutions of removing WebDav and allowing certain HTTP verbs did not work for me.

Upvotes: 1

Views: 5371

Answers (1)

Mike J
Mike J

Reputation: 425

After trying all other solutions and debugging my service project as a separate virtual host in IIS - I found that my web.config within my service project was inheriting the previous directory's web.config

So, I wrapped my system.web & system.webServer sections with:
<location path="." inheritInChildApplications="false">

So my entire web.config in my root site, looked like this:

<?xml version="1.0" encoding="UTF-8"?> <configuration> <location path="." inheritInChildApplications="false"> ... </location> </configuration>

Upvotes: 1

Related Questions