WCF配置
来源:互联网 发布:js调用手机重力感应 编辑:程序博客网 时间:2024/05/16 13:56
记录下 2 <configuration> 3 <system.web> 4 <compilation debug="true" /> 5 </system.web> 6 <!-- 部署服务库项目时,必须将配置文件的内容添加到 7 主机的 app.config 文件中。System.Configuration 不支持库的配置文件。--> 8 <system.serviceModel> 9 <services>10 <service name="ServiceWCF.Seller">11 <endpoint address="" binding="wsHttpBinding" contract="ServiceWCF.ISeller">12 <identity>13 <dns value="localhost" />14 </identity>15 </endpoint>16 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />17 <host>18 <baseAddresses>19 <add baseAddress="http://localhost:8732/Seller/" />20 </baseAddresses>21 </host>22 </service>23 </services>24 <behaviors>25 <serviceBehaviors>26 <behavior>27 <!-- 为避免泄漏元数据信息,28 请在部署前将以下值设置为 false 并删除上面的元数据终结点 -->29 <serviceMetadata httpGetEnabled="True" />30 <!-- 要接收故障异常详细信息以进行调试,31 请将以下值设置为 true。在部署前设置为 false 32 以避免泄漏异常信息-->33 <serviceDebug includeExceptionDetailInFaults="False" />34 </behavior>35 </serviceBehaviors>36 </behaviors>37 </system.serviceModel>38 <connectionStrings>39 <add name="CommerceEntities" connectionString="metadata=res://*/Commerce.csdl|res://*/Commerce.ssdl|res://*/Commerce.msl;provider=System.Data.SqlClient;provider connection string="Data Source=VONXCEVF0IT7JDJ;Initial Catalog=Commerce;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />40 </connectionStrings>41 </configuration>