Results 1 to 6 of 6

Thread: 405 - HTTP verb used to access this page is not allowed.

  1. #1
    Join Date
    Feb 2009
    Location
    Perth, Western Australia
    Posts
    1,430

    Default 405 - HTTP verb used to access this page is not allowed.

    Hi,

    Today I moved my working RESTful services locally onto a production server for further testing. All my verbs, GET, POST and PATCH work except DELETE.

    I've combed everywhere, that I can think of, to see if there is something I've missed. The .WSO has all the verbs defined. I have even tried some others - HEAD - just to pass the time. Server has been rebooted but still no delete.

    The message returned to POSTMAN is:

    Code:
    <fieldset>
    
    <h2>405 - HTTP verb used to access this page is not allowed.</h2>
    <h3>The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to
                        attempt access.</h3>
    </fieldset>
    
    

    As far as I can tell the module request restrictions are correct i.e. DELETE has been defined as acceptable.

    Click image for larger version. 

Name:	2020-09-11_17-23-38.png 
Views:	55 
Size:	103.1 KB 
ID:	13951

    And the web.config also looks correct.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <location path="rest">
            <system.webServer>
                <dataflexHttpModule application="TriumphWS-6.2" enabled="true" object="oTriumphAPIs" verbs="GET,POST,DELETE,PATCH" errortype="0"></dataflexHttpModule>
            </system.webServer>
        </location>
        <system.webServer>
            <handlers>
                <remove name="DataFlex 19.1 Web Services 32bit" />
                <remove name="DataFlex 19.1 Web Services 64bit" />
                <add name="DataFlex 19.1 Web Services 64bit" path="*.wso" verb="GET,POST,DELETE,PATCH" modules="IsapiModule" scriptProcessor="C:\Data\DataFlex 19.1\Bin64\waswsvc.dll" resourceType="Unspecified" requireAccess="Script" preCondition="bitness64" />
                <add name="DataFlex 19.1 Web Services 32bit" path="*.wso" verb="GET,POST,DELETE,PATCH" modules="IsapiModule" scriptProcessor="C:\Data\DataFlex 19.1\Bin\waswsvc.dll" resourceType="Unspecified" requireAccess="Script" preCondition="bitness32" />
            </handlers>
        </system.webServer>
    </configuration>
    Is there anything else?
    Kind regards,

    Clive Richmond
    Triumph Business Systems Pty Ltd
    www.triumph.com.au

  2. #2
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    4,681

    Default Re: 405 - HTTP verb used to access this page is not allowed.

    Set psVerbs to "..."

    in your WebHttpHandler?
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  3. #3
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    1,998

    Default Re: 405 - HTTP verb used to access this page is not allowed.

    Clive

    I'm really not sure what is going on here, but just possibly this Stack Overflow article might point to a possible issue and resolution of it: https://stackoverflow.com/questions/...for-put-method.

    Mike

  4. #4
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    4,681

    Default Re: 405 - HTTP verb used to access this page is not allowed.

    tested this and this will not generate a 405 but rather a 404 so the issue is probably in IIS. Have you tried using IIS failed request tracing?
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  5. #5
    Join Date
    Feb 2009
    Location
    Perth, Western Australia
    Posts
    1,430

    Cool Re: 405 - HTTP verb used to access this page is not allowed.

    Hi Mike,

    Quote Originally Posted by Mike Peat View Post
    I'm really not sure what is going on here, but just possibly this Stack Overflow article might point to a possible issue and resolution of it: https://stackoverflow.com/questions/...for-put-method.
    You're a goldmine of information . Many thanks.

    The article mentions WebDAV trying to handle the requests. Removing the module using the lines suggested in the article addressed the issue. The lines I added to the website's web.config were as follows.:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <modules>
                <remove name="WebDAVModule" />
            </modules>
            <handlers>
                <remove name="WebDAV" />
            </handlers>
            <defaultDocument>
                <files>
                    <clear />
                    <add value="index.html" />
                    <add value="Default.htm" />
                    <add value="Default.asp" />
                    <add value="index.htm" />
                    <add value="iisstart.htm" />
                    <add value="default.aspx" />
                </files>
            </defaultDocument>
        </system.webServer>
    </configuration>
    Kind regards,

    Clive Richmond
    Triumph Business Systems Pty Ltd
    www.triumph.com.au

  6. #6
    Join Date
    Feb 2009
    Location
    Perth, Western Australia
    Posts
    1,430

    Default Re: 405 - HTTP verb used to access this page is not allowed.

    Hi Mike,

    Many thanks for your replies. Dropping WebDAV in the article Mike pointed me to has addressed the issue.
    Kind regards,

    Clive Richmond
    Triumph Business Systems Pty Ltd
    www.triumph.com.au

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •