Enable POST on IIS 7
- by user26712
Hello,
I have a WCF service that requires POST verb. This service is hosted in a ASP.NET application on IIS 7. I have successfully confirmed that GET works, but POST does not. I have the following two operations, GET works, POST does not.
[OperationContract]
[WebInvoke(UriTemplate = "/TestPost", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
public string TestPost()
{
return "great";
}
[OperationContract]
[WebGet(UriTemplate = "/TestGet", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
public string TestGet()
{
return "great";
}
When I try to access TestPost, I receive a message that says: "Method not allowed".
Can someone help me configure IIS 7 to allow POST requests?
Thank you!