I have a WCF service and I can get from it, but I can’t figure out how to do this. I just want to increase the hit field every time a record is used in the client. Here is my code.
Interface:
[OperationContract]
[WebInvoke(Method = "PUT",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "IncSMS")]
void IncSMS();
Method:
public void IncSMS()
{
var business =
(from p in _db.Businesses
where p.BusinessID == 1
select p).FirstOrDefault();
business.SMSHits += 1;
_db.SaveChanges();
}
I get "Method Not Allowed". In IE, can anyone see what Im doing wrong ???
Greetings
Mike.
user903601
source
share