vs2010 + sql2005 报错如题,查看配置文件如下,请教高手为什么?救命啊
服务端web.config
- XML code
<system.serviceModel> <client /> <behaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="DBService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/> </binding> </basicHttpBinding> </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <services> <service name="第二版.DBService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="DBService" contract="第二版.DBService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel>
客户端 ServiceReferences.ClientConfig
- XML code
<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_DBService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:1876/DBService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_DBService" contract="ServiceReference1.DBService" name="BasicHttpBinding_DBService" /> </client> </system.serviceModel> </configuration>
------解决方案--------------------
http://blog.csdn.net/fangxinggood/article/details/6031072