יום חמישי 07 יולי 2011 14:18
I'm getting an error from the HpcServiceHost when I host my service (deployed through SOA debugger):
[HpcServiceHost]: System.ArgumentException: ServiceHost only supports class service types.
at System.ServiceModel.ServiceHost.CreateDescription(IDictionary`2& implementedContracts)
at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri baseAddresses)
Any ideas what this means? My service project is quite large, but it is a normal WCF project.
יום חמישי 07 יולי 2011 16:16
Using the SOA debugger, it copies a config file to each one of the nodes in my cluster. The config file contains this section:
<service assembly="%tmp%\username\UI_EMEAWINWS046_3548\Services.CalculationProject\Services.CalculationProject.dll" />
What I have discovered, is that the part that is missing from the <service assembly /> line is:
Without it, I get the error "HpcServiceHost only supports class service types".
How can I modify the config file that gets generated by the SOA debugger to also include this information (and possibly other settings I want in this file, such as controlling the brokers monitor behavior, or service addresses)?
יום שני 11 יולי 2011 03:16
Does your WCF service interface Services.ICalculationService has [ServiceContract] attibute and your service class Services.CalculationService implement this interface?
יום שני 11 יולי 2011 09:45
Yes it does. The funny thing is, when it was named IService1/Service1 it worked fine, and we of course changed the name to something more appropriate, and it didn't work. I don't know if the config file that gets generated by the SOA debugger ever contained the contract and type strings, though.
Should the config file that gets generated by the SOA debugger be merged with the one in my project, or does it simply get replaced?
יום שלישי 12 יולי 2011 03:36
Could you confirm following things please?
(1) You build the project after you change the class/interface name.
(2) When you press F5, the SOA debugger deploys the generated service assembly to the shared folder specified by you. If you don't specify it, \\<Headnodename>\CcpSpoolDir\<YourAccountName> is the default folder.
(3) Only have one interface with [ServiceContract] attribute in your service assembly. The HpcServiceHost.exe will automatically find it. So actually don't need to specify the contract in the config file. User can't edit the config file, which is generated by the SOA debugger. It is not supported now.
I try to repro your issue. I change the name in this way, it works well for me.
(1) Change the IService1 to IService123, change Service1 to Service123. You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together. Build the project.
(2) In the client project, update the service reference. And change IService1 to IService123 in the client code.
(3) Press F5 to start the SOA debugger.