首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >WCF绑定设置-maxRetryCount=“整型”

WCF绑定设置-maxRetryCount=“整型”
EN

Stack Overflow用户
提问于 2015-06-18 10:02:32
回答 1查看 496关注 0票数 0

我正在尝试将绑定设置设置为“整型”,但它显示“不允许使用maxRetryCount属性”。

我看到它在许多例子中被引用/使用。

我做错了什么?

我想设置此属性(设置),以查看它是否会阻止我收到的错误:已超过最大重试计数,但远程终结点没有响应。可靠会话出现故障。这通常表示远程端点不再可用。

代码语言:javascript
运行
复制
 <?xml version="1.0"?>
 <configuration>  
   <appSettings>
     <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
   </appSettings>
   <system.web>
     <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
     <httpRuntime targetFramework="4.5"/>
     <customErrors mode="Off"/>
   </system.web>  
   <system.serviceModel>    
     <services>
       <service name="dedicated_servers.dedicated_servers.DedicatedServerApi">
         <endpoint address="User" binding="wsHttpBinding" contract="dedicated_servers.dedicated_servers.IDedicatedServerApiUser"      bindingConfiguration="NoSecurityConfig">
         </endpoint>
         <endpoint address="Server" binding="wsHttpBinding" contract="dedicated_servers.dedicated_servers.IDedicatedServerApiServer"      bindingConfiguration="NoSecurityConfig">
         </endpoint>
         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
       </service>
     </services>
     <bindings>
       <wsHttpBinding>
         <binding name="NoSecurityConfig" openTimeout="00:05:00" closeTimeout="00:05:00" sendTimeout="00:05:00"
          receiveTimeout="00:05:00">
           <security mode="None">
             <transport clientCredentialType="None" />
             <message establishSecurityContext="false" />
           </security>
           <reliableSession enabled="true" inactivityTimeout="00:10:00" maxRetryCount="8" />
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
       <serviceBehaviors>
         <behavior>
            <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
            <serviceDebug includeExceptionDetailInFaults="true"/>
         </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>    
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
     <modules runAllManagedModulesForAllRequests="true"/>
     <directoryBrowse enabled="true"/>
  </system.webServer>
 </configuration>
EN

回答 1

Stack Overflow用户

发布于 2015-06-18 12:31:47

请参阅此answer。套用一下,你不能在wsHttpBinding上设置maxRetryCount,但是你可以做一些自定义的绑定技巧来使它工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30905323

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档