Hello,
I am currently using a RESTDatasource to populate my igGrid and I d'like to know if there is a way to change the update behaviour to make a POST request instead of a PUT request. I am currently using a IIs WebServer and it can be difficult to use PUT requests when WebDav is installed (I can't be sure it won't be present). In the meantime, I'm still looking for a solution to make it work (WebDav + PUT Request) but if there is a POST solution it could be an acceptable fall back for me.
Thank you!
Hello Vincent,
Thank you for taking time to share your approach with the community. I believe it is going to very helpful if someone faces the same issue.
Me again,
Just for information I found a way to make PUT/DELETE requests work with WebDav & WebAPI so I will use the REST standard implementation. The error I had was 500.21 (Internal Server Error Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagerPipelineHandler" in its module list), this was linked to WebDav being installed.
2 Solutions :
- 1 Disable WebDav :
- In IIs configuration click on the website, on the middle panel double click on "WebDav Authering Rules", on the right panel clic on "Disable WebDav". /!\ This means no web application can use WebDav under this site.
- 2 Keep WebDav on the site & disable WebDAV for the web application / WebApi :
- Modify your web application web.config as follow:
<system.webServer> <modules runManagedModulesForWebDavRequests="true"> <remove name="WebDAVModule" /> ........ <modules> <handlers> <remove name="WebDAV" /> ....... </handlers> ..... </system.webServer>
Add the attribut runManagedModulesForWebDavRequests="true" to the modules xml element (cf. https://docs.microsoft.com/en-us/iis/configuration/system.webserver/modules/)
Add the <remove name="WebDAVModule"> to the "modules" xml element.
Add the <remove name="WebDAV"> to the "handlers" xml element.
Hope it helps somone ^^.
Thanks for all your help and suggestions
I am glad that Stamen`s solution was helpful for you!
Thank you for taking time to share your observation with our community.
Please let us know if you need any further assistance.
Thank you for your help, I had the time to test your solution and it's working which will be a fall back for me if i cannot fix my put problem. Just for information there is also another limitation that I didn't thought at first : you cannot use the url templating ({id}) with post request (which is normal).
I ll let you know if I find a solution for the PUT problem I encounter.
Best regards
Thank you for using Infragistics forums!
There is no direct way to set the HTTP verb for the update requests, however, you could inherit the RESTDataSource and change its verb mapping. It would look something like that: