WCF - Contract Name could not be found in the list of contracts

后端 未结 6 860
猫巷女王i
猫巷女王i 2020-12-20 11:10

I am relatively new to WCF. However, I need to create a service that exposes data to both Silverlight and AJAX client applications. In an attempt to accomplish this, I have

6条回答
  •  难免孤独
    2020-12-20 11:41

    In the web.config file, the element's name attribute needs to be the service type's name with the namespace, but not the assembly (Namespace1.Namespace2.Class). The element's contract attribute similarly has namespace-qualified interface type - Namespace1.Namespace2.Interface.

    This also solves all behavior shenanigans, like CreateBehavior not being invokes on BehaviorExtensionElement.

提交回复
热议问题