Monday, July 18, 2011

WCF Service - Could not find a base address that matches schema http

Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are []..

This is probably the most painfull error that I have ever experienced. After trying many fixes and googling for hours.

Problem : I only got this error when the web service was deployed to a Sharepoint web application that did not use a DNS entry to access the site. (Web service deployed to the ISAPI folder)

Fix : The solution which helped me was to remove the Base Address tags from my web.config file and my service worked. See below:




When I removed the above tags I no longer had problems accessing my webservice from my SharePoint site.