This error came up today, when I was testing my WCF services for a new website that I am writing. The ultimate issue here is the mapping of the interface to the service in question, and usually points to a possible mistype or rename of something within your service architecture. The primary message received here can be:

“The type ‘OdatServiceAzure.SiteService’, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. “

So, how do we conquer this error? Well, if you are debugging a program with a bunch of different services, it’s probably best to debug each service, one by one. Select the service you want to test and run it. If you can run it completely, there shouldn’t be an issue with pairing the interface and service. If there is, you may see an error like that shown above. The primary place you want to look is at the markup for the service itself.

Right click on your service, and click ‘View Markup’.

image

Make sure your namespace and service name here match your service name itself. In my case, I had renamed my namespace due to an issue with it, and my services for some reason, did not rename within the .svc markup.

Advertisements