服務(wù)端配置文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<appSettings>
<add key="secretKey" value="!@#$aIMeILIfe2014SysTem%^*" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<!--LOG日志 2014-10-15 BY 翁喬-->
<log4net>
<logger name="MPLIFE">
<level value="ALL" />
</logger>
<logger name="logerror">
<level value="ERROR" />
<appender-ref ref="ErrorAppender" />
</logger>
<logger name="loginfo">
<level value="INFO" />
<appender-ref ref="InfoAppender" />
</logger>
<logger name="logtrace">
<level value="INFO" />
<appender-ref ref="TraceAppender" />
</logger>
<!--調(diào)試日志-->
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Log\\Info\\" />
<param name="AppendToFile" value="true" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyyMMdd".log"" />
<param name="RollingStyle" value="Date" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%n信息時間:%d%n信息內(nèi)容:%m%n" />
</layout>
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
</appender>
<!--錯誤日志-->
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Log\\Error\\" />
<param name="AppendToFile" value="true" />
<param name="StaticLogFileName" value="false" />
<param name="DatePattern" value="yyyyMMdd".log"" />
<param name="RollingStyle" value="Date" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%n異常時間:%d%n異常內(nèi)容:%m%n" />
</layout>
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
</appender>
<!--跟蹤日志-->
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%m" />
</layout>
</appender>
</log4net>
<system.serviceModel>
<services>
<service name="Suppot.Servies.SuppotServies">
<endpoint binding="wsDualHttpBinding" bindingConfiguration="SuppotServicesBinding" behaviorConfiguration="SuppotBehavior" contract="Suppot.Servies.ISuppotServies">
</endpoint>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="SuppotBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior>
<!-- 為避免泄漏元數(shù)據(jù)信息,請在部署前將以下值設(shè)置為 false 并刪除上面的元數(shù)據(jù)終結(jié)點 -->
<serviceMetadata httpGetEnabled="true" />
<!-- 要接收故障異常詳細信息以進行調(diào)試,請將以下值設(shè)置為 true。在部署前設(shè)置為 false 以避免泄漏異常信息 -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsDualHttpBinding>
<binding name="SuppotServicesBinding" receiveTimeout="00:03:00" sendTimeout="00:03:00" maxReceivedMessageSize="2147483647" transactionFlow="True">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</wsDualHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
創(chuàng)新互聯(lián)是專業(yè)的礦區(qū)網(wǎng)站建設(shè)公司,礦區(qū)接單;提供成都網(wǎng)站設(shè)計、做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行礦區(qū)網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
客戶端配置:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IAccount" />
<binding name="BasicHttpBinding_IBaseService" />
</basicHttpBinding>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_ISuppotServies" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="true" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="None">
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://****/Sys/Account.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAccount"
contract="Account.IAccount" name="BasicHttpBinding_IAccount" />
<endpoint address="http://****/baseinfo/BaseService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBaseService"
contract="BaseService.IBaseService" name="BasicHttpBinding_IBaseService" />
<endpoint address="http://****/SuppotServies.svc"
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_ISuppotServies"
contract="SuppotServies.ISuppotServies" name="WSDualHttpBinding_ISuppotServies" />
</client>
</system.serviceModel>
</configuration>
網(wǎng)頁名稱:WCFwsDualHttpBinding綁定
文章起源:http://jinyejixie.com/article20/pggeco.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、定制網(wǎng)站、網(wǎng)站營銷、Google、移動網(wǎng)站建設(shè)、全網(wǎng)營銷推廣
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)