My WCF service exposes this function
public SerialNumberInfo GetSerialNumberInfo(string serialNumber) { }
Is there a way to enable HTTP GET on my WCF service? Example:
http://localhost:8004/MyService/GetSerialNumberInfo?serialNumber=4
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.
yes, you need to use the
webHttpBindingon your WCF service.See the WCF REST Starter Kit for more information on REST Support in WCF.
If you’re hosting your service in IIS, you need to create a separate *.svc file for the REST service (let’s call it
RESTService.svc), which contains:Now you should be able to connect to the URL
and get your data RESTfully.
Marc