How to configure IIS 7.5 to allow Inserts and Deletes with WCF Data Services (PUT and DELETE)
I have a WCF Data Service that works fine on my development system. But when I deployed it to my client's web server, inserts, updates, and deletes all failed. Updates failed with "401 - Unauthorized: Access is denied due to invalid credentials." This seems to be an integrated authentication problem. I found a workaround on StackOverflow involving setting full permissions on my .svc file for "Authenticated Users" and now updates work. I also found a WCF Data Services blog by Zoiner Tejada that explains the correct way to take care of this issue.
But inserts and deletes still don't work. I'm getting "405 - HTTP verb used to access this page is not allowed." As verified with Fiddler, the verbs are PUT and DELETE.
I deployed the service as an application under my website. The Application Pool is "ASP.NET v4.0," and Pipeline Mode is Integrated.
The following is what I know about mapping verbs. In IIS Manager, I right-click on the application and then click Handler Mappings, and I find "svc-Integrated-4.0" registere开发者_运维问答d for the path *.svc. When I click Edit for that, then Request Restrictions, then Verbs, "All Verbs" is selected. I'm stuck – how can I get this to work?
Workaround: set the DataServiceContext.UsePostTunneling
property to true.
精彩评论