WCF hosting error - system.serviceModelserviceHostingEnvironmentserviceActivations not be found

Last Reply on Aug 06, 2014 06:31 AM By Azim

Posted on Aug 06, 2014 06:23 AM

I have create wcf site it's work on iis but whent im uploading on server it's give an error like -


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

Config file as below -

    <httpErrors errorMode="Detailed"></httpErrors>
    <asp scriptErrorSentToBrowser="true"></asp>
    <validation validateIntegratedModeConfiguration="false"/>
    <directoryBrowse enabled="true"/>
    <customErrors mode="Off" defaultRedirect="Service.svc">
      <error statusCode="404" redirect="Service.svc"/>
    <trust level="Full"/>   
    <compilation debug="true" targetFramework="4.0">
    <serviceHostingEnvironment aspNetCompatibilityEnabled="True" multipleSiteBindingsEnabled="True"></serviceHostingEnvironment>
          <serviceDebug includeExceptionDetailInFaults="false"/>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>  
    <modules runAllManagedModulesForAllRequests="true"/>

Service.svc file as -

<%@ ServiceHost Language="C#" Debug="true" Service="Service" CodeBehind="http~/App_Code/Service.cs" %>

plz help me. Thanks.

You are viewing reply posted by: Azim on Aug 06, 2014 06:31 AM.
Posted on Aug 06, 2014 06:31 AM

Please refer this link


It is also due to Target Framework problem. Check your WCF and WEB Application Target Framework. It should be same.