Tag Archive: debugging


When working with WCF services, as well as, Azure storage, you sometimes will need to install support packages for certain dependencies, as well as, SDK’s. These sometimes can make some configuration alterations to cause issues with current services you already have configured. Such was the case with a set of WCF services that I had written, and began debugging.  The error stated:

 

image

Ultimately, this issue really is more of an annoyance for testing, more than anything. The important thing is, it is easy to fix! Depending on what version of .NET you are writing against, differentiates where this will need to be fixed. In my case, it was:

\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

You can search the file for the <client> block. Once found, just comment out the entire block, so if in the future you need it, you can uncomment it. After saving the file, go ahead and try retesting your WCF file, and you should no longer get the error!

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.