Hi all.
I've found a lot of similar looking issues, but nothing that has made it clear to me why I am getting an error I'm getting.
Using all sorts of WCF projects, if I try to host them in IIS I get the following error:
The type 'Microsoft.ServiceModel.Samples.CalculatorService', provided as the Service attribute value in the ServiceHost directive could not be found.
This is the exact error I get when I follow the instructions on http://msdn.microsoft.com/en-us/library/ms733766.aspx.
I have this same error (with a different class name) for all the other WCF projects I've tried to host in my local IIS, and on IIS on a 2008 server, including ones that go with Essential WCF 3.5 and a service I've created from scratch.
I'm not sure what needs to match with what, or if I'm missing something on my svc file. Copying the MS example though I have just the single line in my svc file:
<%@ServiceHost language=c# Debug="true" Service="Microsoft.ServiceModel.Samples.CalculatorService"%>
My own service is working, it seems, when I run it just pressing F5 in VS2008 then access it using WCF Test Client. If I try to add service and pass in http://localhost/IISHostedCalc/Service.svc I get:
Error: Cannot obtain Metadata from http://localhost/IISHostedCalc/Service.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.
Can anyone help? All the examples I've seen seem to suggest this should just work, so I may no idea what I need to do. I'd guess it's a setting thing, but I have no idea what the "thing" is!