With the popularity of WCF Rest services, it is now a bit more common to issue HTTP PUT and HTTP DELETE requests. I don't remember using those verbs before in my career. Whenever I needed to delete something or update something, I would use HTTP POST and then handle the data in the back end. But times have changed, and with WCF Rest embracing the HTTP protocol, you are more likely to work with those two verbs more often.
In one of my recent works, I developed a WCF Rest service. And whenever I issued either a PUT request or a DELETE request, I invariably ended up receiving an HTTP 401 error. Surprisingly the service worked beautifully for POST and GET requests. The requests with the problem reflected an issue related with permissions to files on the hard disk.
After some headaches and a little bit research I found one possible solution:
You grant the IUSR user "write" access to the directory where your service is deployed and problem solved.
By right clicking on the folder where your service is located, then Properties and going to the Security tab you can add the ISUR user. Remember to check the Write permission.
I understand that asking a network admin for this, might intimidate him. So, if you know an alternate solution, please post in in the comments section.
Michael Ryan says:
ReplyDeleteHave you guys tried this :
http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/514f2e2d-54a8-4516-976d-94a879209173
In the web.config?