Monday, June 17, 2013

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

The HTTP verb POST used to access path '/html5demos/post.html' is not allowed.

When you tried to work on html page in Visual studio sometime it fire above error.

<!DOCTYPE html>
<html>
<head>
    <title>Untitled Page</title>
</head>
<body>
    <form name="form" id="form1" method="post" action="post.html" target=_self>
    <input type="text" id="text2" name="text2"  />
    <input type="text" id="Text1"  />
    <input type="submit" name="Submit" value="Submit" />
  
    </form>
</body>
</html>

Solution

Problem : File type is not registred in IIS amp setting. Http POST , HEAD are respond with 405 error.

1.GO to Control Panel "Administrative Tools" --> IIS
2.Select The Website and select handler mapping
3.Add Script map
Request Path Should Be " .Htm "
or ".html"
Select this Path  C:\Windows\System32\inetsrv\asp.dll

Name  what ever u can 

After this click on Request Restriction 
 Mapping  :  "Invoke handler only if request is mapped to :" 
check "file" 

Verbs :  "All Verbs"

In the last Click Okay OK

Hope it will work fine... 


No comments:

Post a Comment