Enable POST on IIS 7
Posted
by
user26712
on Server Fault
See other posts from Server Fault
or by user26712
Published on 2011-02-05T21:25:12Z
Indexed on
2011/02/05
23:27 UTC
Read the original article
Hit count: 227
iis7
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!
© Server Fault or respective owner