I have a WCF service that has been hosted on a Windows Service and uses the BasicHttp endpoint to serve Windows Mobile devices that has been connected to it.
The problem is that with the Device Emulator. I can connect to the service and using it without any problems, but with an actual device. I receive the error:
WCF The request failed with HTTP status 405: Method Not Allowed.
I have used following code to implement the service.
BasicHttpBinding basicHttpBinding = new BasicHttpBinding();
basicHttpBinding.UseDefaultWebProxy = false;
m_ServiceHost.AddServiceEndpoint(typeof(IKooft), basicHttpBinding, "KooftService");
m_ServiceHost.Open();
How can I solve this problem?
Check your IIS extensions, particularly those for .wsdl are valid:
In IIS:
That should be it.
If you are using a WCF REST service, you should define your contract method like this:
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
string CheckService();
Particularly note that WebInvoke
attribute and Method="POST"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With