rest - PUT method error code 405(method not allowed) in restful service URL using VS2013 and IIS Express 8 -


i using put method in restful service throwing error 405 gone through posts in google changed iis config setting not working.

before marks duplicate have been dealing issue couple of days, , none of suggested procedures in following posts helped:

method 1

yet method

you can find more examples, of them referring webdav module (i don't have reputation give more references). if many report solved issue, reason did not solve me, , since question keeps being posted guess not 1 fighting issue. here way managed have delete, put, options verbs working (in both express , iis8.5). simple adding new mapping handler protocolsupportmodule, or in web.config terms:

<add name="otherverbshandler" path="*" verb="put,delete,options" modules="protocolsupportmodule" /> 

do not use handler remaining verbs, since won't able load static files (if nothing else). please note new asp.net , insightful comments solution welcome.

edit: work-around did not solve me, since delete request not handled proper controller/action, returning 200 ok. however, fiddling around other api found out solution. missing options method (returning 200 ok) in case of other api implemented because of pre-flight requests. still don't know why 1 couldn't see problem in error output, api working fine now.

//this necessary browsers isssue preflight requests //even cors enabled! public httpresponsemessage options() {             return request.createresponse(httpstatuscode.ok, "options route activated."); }  public httpresponsemessage delete(string project, string runid) {             return request.createresponse(httpstatuscode.notimplemented, "delete route activated.");  } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -