I've used the "Walkthrough: Creating and Implementing a Custom WCF Service in SharePoint Foundation" from MSDN to create my cusom WCF Service and deploy to my Sharepoint 2010 server.

The wsp is globally deployed and when I access the service in the browser using the url: http://myserver/_vti_bin/Revert.svc/MEX everything seems ok. The problem is when I need to access the service on another webapplication on the server: http://intranet.mydomain.com/_vti_bin/Revert.svc/MEX. This gives me a "HTTP 400 Bad Request" error. This webapplication was created on port 81, so I can access the service by using the url: http://myserver:81/_vti_bin/Revert.svc/MEX.

I've set up AAM and also added the binding for port 80 in the IIS Management Console. I can use the builtin services like "listdata.svc" using the http://intranet.mydomain.com url, but not my custom wcf service. Does anyone know why?

Best Regards ElinK

  • What HTTP method did you request, was it GET or POST. If it a POST, you should check the response from the server. In my experience HTTP 400 was because response from the server was not in expected format (json/xml). But it was in html where the server returned page server error in ...
    – Ariwibawa
    Commented Apr 11, 2018 at 15:10

2 Answers 2


Have you added the host name in the binding settings in the IIS Management Console? If not the WCF service can not identify the correct urls.


I have a similar problem. The SP site works fine, just a custom wcf service has a problem.

I have found that whatever is defined first in the bindings in IIS works and the second one fails. Not much help to me but may help others.

I still don't have an actual fix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.