Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何添加WCF maxClockSkew_Wcf_Wcf Binding_Wcf Security_Wcf Client - Fatal编程技术网

如何添加WCF maxClockSkew

如何添加WCF maxClockSkew,wcf,wcf-binding,wcf-security,wcf-client,Wcf,Wcf Binding,Wcf Security,Wcf Client,我已将maxClockScrew添加到我的WCF服务配置文件中,因为当我尝试通过internet调用它时,它会给我一个错误,但当我将我的客户端时区更改为服务器时区时,它工作正常(当两者都在UTC+10.00时,这意味着没有时差),或者如果我将两者的时间设置为从internet同步,则工作正常 这是我的服务配置文件 <?xml version="1.0"?> <configuration> <appSettings> <add key="Data Sour

我已将maxClockScrew添加到我的WCF服务配置文件中,因为当我尝试通过internet调用它时,它会给我一个错误,但当我将我的客户端时区更改为服务器时区时,它工作正常(当两者都在UTC+10.00时,这意味着没有时差),或者如果我将两者的时间设置为从internet同步,则工作正常

这是我的服务配置文件

<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="Data Source" value="WIN-HDG2"/>
<add key="Initial Catalog" value="DEV"/>
<add key="User ID" value="sa"/>
<add key="Password" value="ssa"/>
<add key="Major version" value="1"/>
<add key="Minor Build" value="1"/>
</appSettings>
<connectionStrings/>
<system.web>   

<compilation debug="true" targetFramework="4.0">
</compilation>
<authentication mode="Windows"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.serviceModel>
<services>
  <service behaviorConfiguration="ABService.ServiceBehavior"
   name="ABService.Service">

<endpoint address="" binding="wsHttpBinding" name="ValidatorEndpoint" bindingConfiguration="ABService.ServiceBehavior"
     contract="ABService.IService">
      <identity>
        <dns value="localhost" />
      </identity >
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost/" />
      </baseAddresses>
    </host>

  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ABService.ServiceBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceCredentials>
        <serviceCertificate findValue="AB548"
              storeLocation="LocalMachine"
              storeName="My"
              x509FindType="FindBySubjectName" />
        <userNameAuthentication userNamePasswordValidationMode="Custom"
         customUserNamePasswordValidatorType="ABService.Validator.UserNamePassValidator,ABService" />
      </serviceCredentials>

    </behavior>
  </serviceBehaviors>
</behaviors>


<bindings>
  <wsHttpBinding>
    <binding name="ABService.ServiceBehavior" >
      <readerQuotas maxDepth="320" maxStringContentLength="8192000" maxArrayLength="16384000" maxBytesPerRead="999930473" maxNameTableCharCount="16384000"/>
      <security mode="Message">
        <message clientCredentialType="UserName"/>
      </security>
    </binding>
  </wsHttpBinding>


  <customBinding>
    <binding name="ABService.ServiceBehavior">
      <textMessageEncoding />
      <security authenticationMode="Kerberos">
        <localClientSettings maxClockSkew="00:07:00" />
        <localServiceSettings maxClockSkew="00:07:00" />
        <secureConversationBootstrap>
          <localClientSettings maxClockSkew="00:30:00" />
          <localServiceSettings maxClockSkew="00:30:00" />
        </secureConversationBootstrap>
      </security>
      <httpTransport />
    </binding>
  </customBinding>
</bindings>

请找个人帮我解决这个问题