none
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=1.0.0.0, 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" ?>
    <configuration>
      <system.web>
        <compilation debug="true" />
      </system.web>
      <system.serviceModel>
        <services>
          <service behaviorConfiguration="HelloWorldService.Application.HelloWorldBehavior"
            name="HelloWorldService.Application.HelloWorld">
            <endpoint address="" binding="wsHttpBinding" contract="HelloWorldService.Application.IHelloWorld">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:9000/" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="HelloWorldService.Application.HelloWorldBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
    </configuration>

    Wednesday, February 12, 2014 6:32 PM

Answers

  • 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