The type, provided as the Service attribute value in the ServiceHost directive could not be found. RRS feed

  • Question

  • I have tried now a lot of different .svc configs to get my service working but I only get the error provided

    Thats my actual try Helloworld.svc:

    <%@ ServiceHost Language="C#" Debug="true" Service="HelloWorldService.Application.HelloWorld, HelloWorldService.Application, Version=, Culture=neutral, PublicKeyToken=7a99a320600fe78f" %>

    I have signed the assembly, and generated the public key token. It also was not working with PublicKeyToken=null and no signing.

    I have published via visual studio the project. It is a WCF Service Application.

    This is the code inside Helloworld.svc.cs

    namespace HelloWorldService.Application
        public class HelloWorld : IHelloWorld
            public string SayHello(string inputName)
                return "Hello " + inputName;

    and this is my webconfig:

    <?xml version="1.0" encoding="utf-8" ?>
        <compilation debug="true" />
          <service behaviorConfiguration="HelloWorldService.Application.HelloWorldBehavior"
            <endpoint address="" binding="wsHttpBinding" contract="HelloWorldService.Application.IHelloWorld">
                <dns value="localhost" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                <add baseAddress="http://localhost:9000/" />
            <behavior name="HelloWorldService.Application.HelloWorldBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>

    Wednesday, February 12, 2014 6:32 PM


  • It was my application pool in the iis which was not configured right to use .Net 4
    • Marked as answer by Mark-Spirit Friday, February 14, 2014 7:30 PM
    Friday, February 14, 2014 7:30 PM

All replies