WCF配置文件,存下来供自己参考
Server:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Behavior1">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Behavior1" name="TeamService.ProjectService">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="" bindingName="wsHttpBindingdd" contract="TeamService.IProjectService"/>
<host>
<baseAddresses>
<add baseAddress="http://localhost:7777/ProjectService"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
<system.web>
<compilation debug="true"/></system.web>
<connectionStrings>
<add name="ModelContainer" connectionString="metadata=res://*/Data.Model.csdl|res://*/Data.Model.ssdl|res://*/Data.Model.msl;provider=System.Data.SqlClient;provider connection string="Data Source=tfs;Initial Catalog=Teamwork;User ID=team;Password=p123!@#;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
Client:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBindingdd_IProjectService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:7777/ProjectService.svc"
binding="wsHttpBinding" bindingConfiguration="wsHttpBindingdd_IProjectService"
contract="ProjectServiceReference.IProjectService" name="wsHttpBindingdd_IProjectService">
<identity>
<userPrincipalName value="QUIETWALK\Administrator" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>