WCF 中 webconfig 配置问题
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <!--<bindings>这里是因为,WCF,只能通过BasicHttpBinding传递数据 <customBinding> <binding name="SilverlightDBDemo.Web.DBService.customBinding0"> <binaryMessageEncoding /> <httpTransport /> </binding> </customBinding> </bindings>--> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IDataService" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </basicHttpBinding> </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> <services> <service name="SilverlightDBDemo.Web。DBService"><!--这里是 全角的 句号,按理说,应该是英文输入法下面的 点 --> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDataService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel>