Search code examples
visual-studio-2013sharepoint-2013wcf-data-services

The Type xx provided as the Service attribute value in the ServiceHost directive


Error while even browsing to http://xxx/mysite/_vti_bin/service/service.svc

The Type NameSpace.Classx, AssemblyName, Version=1.1.1.1, Culture=neutral, PublicKeyToken=xxx provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found

  • when I run gac /l I found exactly the assembly as on screen
  • the interface NameSpace.iInterface is exactly stated in the servicecontract file
  • the main NameSpace.Classx is exactly as stated
  • assemblyInfo.cs has exactly the AssemblyName as stated
  • I deploy this via a solution to the ISAPI/myfolder under SP so no need to change virtualdir/application settings
  • Changed the project output path to /bin fom /bin/x86
  • I can see that the files are deployed in the physical /ISAPI/myfolder
  • Clean, delete bin and obj folders , build, deploy
  • Also tried making a /bin folder under there and putting the assembly in there
  • The rest service targets .Net 4.5 (as that is SP2013 required)

This is happening since yesterday, as far as I know I didn't change a thing. What DID happen since yesterday however that that debugging the WCF Rest service no longer worksed (debug > IE opens > never jumps to Visual Studio), after a while... this happened.


Solution

  • The assembly was changed to compile to x86, when setting back to 64 bits compilation, the error was resolved.