I have MVC Web API that have POST and PUT functions; POST function calls succeeded but PUT function call failed with:
internal server error;
Functions are identical "I use one function at a time and the other one will be commented; Just for testing purposes".
public HttpResponseMessage Put(string id)
{
HttpStatusCode statusCode = HttpStatusCode.OK;
return Request.CreateResponse<string>(statusCode, id);
}
public HttpResponseMessage Post(string id)
{
HttpStatusCode statusCode = HttpStatusCode.OK;
return Request.CreateResponse<string>(statusCode, id);
}
Edit: It works fine locally at my machine for both POST and PUT (Windows 8.1); but when i move it to another machine (Windows Server 2012 )only POST functions works.