What is the bare minimum I need to put in web.config to get WCF working with REST? I have annotated my methods with [WebGet], but they are not getting the message.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I discovered that you can add the following to the ServiceHost directive in the *.svc file, and it will automatically setup WebHttpBinding and WebHttpBehavior for you:
Note that the namespace is a little different from what is mentioned elsewhere on the web (such as in this MSDN article).
After doing this, I was able to delete the entire section from web.config and everything still worked!