Environment configuration: Silverlight 2 Tools for Visual Studio 2008 SP1
VSTS2008 +SP1
MSSQLSERVER2005
Silverlight-enabled WCF templates
Can you pass in Visual Studio? Innovation builds a WCF project to build WCF services that can communicate with Silverlight applications.
As an alternative to creating WCF services, you can select a file project template in Visual Studio to create the Silverlight-enabled WCF service. The new project template in Visual Studio is displayed. It is said that this template automatically sets the bindings to BasicHttpBinding and adds some properties to make the service compatible with ASP.net. Although this method can set the correct binding configuration for you, do not forget that you can still use existing WCF services, provided that these bindings are set for BasicHttpBinding.
As long as the Silverlight application has a basichttpbinding type of binding, it can invoke the standard WCF service. You must make sure that you can change the default binding of the WCF service from custombinding to BasicHttpBinding, or you must create a new binding for the BasicHttpBinding type. The Web.config file for the WCF service host application contains the following XML used to define the service configuration.
In my VS2008 English version, web.config for WCF more than the following information configuration;
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name= "WCF. Wcfbehavior ">
<servicemetadata httpgetenabled= "true"/>
<servicedebug includeexceptiondetailinfaults= "false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name= "CUSTOMBINDING0" >
</binding>
</customBinding>
</bindings>
<servicehostingenvironment aspnetcompatibilityenabled= "true"/>
<services>
<service behaviorconfiguration= "WCF. Wcfbehavior "Name=" WCF. WCF ">
<endpoint address= "" binding= "CustomBinding" bindingconfiguration= "CUSTOMBINDING0"
Contract= "WCF. WCF "/>
<endpoint address= "Mex" binding= "mexHttpBinding" contract= "IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
Do not know is not English version of the reason,<custombinding> should default is <basichttpbinding> In some foreign forums found the same problem,
Moreover, the key issue is in the client's Servicereferences.clientconfig file, only </configuration> This can easily occur "The keyword is not in the data dictionary problem", the problem is obvious