I'm facing the folowing situation: When I call a WCF Service with GET (getUserByUID) the service returns the correct data. When I call InsertUser the server returns HTTP error 405 Method not allowed.
I think it can be a Server configuration problem. I've already googled a lot and didn't find a solution.
The environment is Win2008R2 with IIS7.5
Thank you in advance,
[ServiceContract]
public interface IUserService
{
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetUserById?x={uid}")]
User getUserByUID(string uid);
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, UriTemplate = "InsertUser")]
string InsertUser(User user);
@Mairaj Ahmad thank you for trying to help.
I found the error. I had WebDAV Handler Mapper in the IIS even after I remove it from IIS.
I deleted the entry and the service worked.