Follow in Twitter & Facebook



Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools



Saturday, March 31, 2012

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

Introduction:
I found the below error while doing one Wcf sample in Visual Studio 2010. The error is
The type 'WcfSampleService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

Description:
Also we have discussed what is WCF and how you can call a wcf service in an asp.net application.
Here WcfSampleService is the .svc file name.
I mentioned wrongly inside the .svc file WcfSampleService as the service name instead of my original service name.

So inorder to solve this error just open your .svc file then change your service name and the service name inside the code behind tab containing the path in side your .svc file.

The .svc file looks like below
<%@ ServiceHost Language="C#" Debug="true" Service="MyService" CodeBehind = "~/App_code/Myservice.cs %>
Check here the advantages of WCF.




0 on: "The type, provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found"