[OperationContract]
[WebInvoke(UriTemplate = "createinvoice", Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public Invoice CreateInvoice(string instance)
{
// TODO: Add the new instance of SampleItem to the collection
try
{
string icode = instance;
//decimal paid = instance.AmountPaid;
return new Invoice() {InvoiceCode = icode };
}
catch(Exception)
{
throw new NotImplementedException();
}
}
Everytime я запустить его в браузере он говорит:Метод не допускается в WCF службы Rest
Method not allowed. Please see the service help page for constructing valid requests to the service.
Любые идеи? Также, когда я иду и делаю это в браузере. он говорит, что конечная точка не найдена. (Mobile) является виртуальным каталогом, в то время как (POS) является зарегистрированным маршрутом для service1.cs