You can enable tracing/logging in wcf
service , so that you can check actual cause of error, if there is mismatch in param or any other thing , directly from error logs.
Refer this to enable tracing, it is just simple config setup - http://msdn.microsoft.com/en-us/library/ms733025(v=vs.110).aspx or How to turn on WCF tracing?
...
Other suggestions:
In ServiceContract
, for required method, you have used required attributes. So lets say, Service.svc has servicecontractor defined in IService.cs
, and you are concerned about Method
. Then Method
should be declared like this.
[OperationContract]
[WebGet(UriTemplate = "Method?parameter={value}")]
string AnyMethodName(string value);
Here i have used string
as both input and output param type, you can use required type here.
Apart from this, you need to have required web.config to have service,binding,endpoint etc. configured properly. Refer - http://msdn.microsoft.com/en-us/library/ms733932(v=vs.110).aspx
So that if you host it in http://www.example.com
, then you can execute REST
based Get
request using http://www.example.com/Service.svc/Method?parameter=XYZ
.
More info - http://www.c-sharpcorner.com/UploadFile/b1df45/rest-based-api-using-wcf-services/
Also, as suggested above, there might be some URL rewriting
setup, that you have check and fix. or try with https
version of URL directly. Or if there is some proxy server that is blocking, has to be checked.
If there is request filtering
setup, then check if GET
request is blocked there.
Or if at all possible, re-register IIS using aspnet_regiis.exe -iru
.