tags:

views:

601

answers:

1

I created a REST webservice in WCF that originally used POST to perform any inserts and deletes. Mostly out of curiosity, I decided to change the insert to a PUT and the delete to a DELETE. While this worked fine on my local machine (using the built-in VS2008 webserver), I'm getting this error when trying to target an actual server deployed elsewhere:

The HTTP request was forbidden with client authentication scheme 'Anonymous'.

Do I need to do something to specifically allow PUT and DELETE on the server (either via the web.config or through configuration in IIS), or do I somehow need to pass along my credentials to my HttpClient so that it can identify itself as something other than Anonymous?

Unfortunately, PUT and DELETE are incredibly common words, so scouring Google for the last hour hasn't yielded much in the way of useful results.

+2  A: 

You may want to check you're allowing those verbs or "All Verbs" in IIS, if not you can easily just type them in. Also to be truly REST you may have to configure IIS to pass through all virtual paths to your application instead of checking if they physically exist.

Lloyd
That did it. Thanks!All I had to do was find the .svc extension in the IIS configuration for the site and change it to allow "All Verbs".
jerhinesmith
it didnt worked for me :(
Miral