Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 4.70 KB  |  hits: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. WCF Duplex - Client is unable to finish the security negotiation within the configured timeout
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <configuration>
  4.   <system.diagnostics>
  5.     <sources>
  6.       <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
  7.         <listeners>
  8.           <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:logTraces.svclog"/>
  9.         </listeners>
  10.       </source>
  11.     </sources>
  12.   </system.diagnostics>
  13.   <system.serviceModel>
  14.     <bindings>
  15.       <wsDualHttpBinding>
  16.         <binding name="WSDualHttpBinding_I_BridgeWCFService" closeTimeout="00:01:00"
  17.           openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
  18.           bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
  19.           maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646"
  20.           messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
  21.           <readerQuotas maxDepth="256" maxStringContentLength="2147483646"
  22.             maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
  23.           <reliableSession ordered="true" inactivityTimeout="01:10:00" />
  24.           <security mode="Message" />
  25.         </binding>
  26.       </wsDualHttpBinding>
  27.     </bindings>
  28.     <client>
  29.       <endpoint address="http://win-jj/_Bridge1/_BridgeWcfService.svc"
  30.         binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_I_BridgeWCFService"
  31.         contract="_BridgeWcfServiceReference.I_BridgeWCFService"
  32.         name="WSDualHttpBinding_I_BridgeWCFService">
  33.         <identity>
  34.           <dns value="localhost"/>
  35.         </identity>
  36.       </endpoint>
  37.     </client>
  38.   </system.serviceModel>
  39.   <startup>
  40.     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
  41.   </startup>
  42. </configuration>
  43.        
  44. <?xml version="1.0"?>
  45. <configuration>
  46.   <system.serviceModel>
  47.     <bindings>
  48.       <wsDualHttpBinding>
  49.         <binding name="WSDualHttpBinding_I_BridgeWCFService" closeTimeout="01:01:00" openTimeout="01:01:00" receiveTimeout="01:10:00" sendTimeout="01:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
  50.           <readerQuotas maxDepth="256" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/>
  51.           <reliableSession ordered="true" inactivityTimeout="01:10:00"/>
  52.           <security mode="Message">
  53.             <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
  54.           </security>
  55.         </binding>
  56.       </wsDualHttpBinding>
  57.     </bindings>
  58.     <services>
  59.       <service behaviorConfiguration="_BridgeNameSpace.Service1Behavior" name="_BridgeNameSpace._BridgeWCFService">
  60.         <endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_I_BridgeWCFService" contract="_BridgeNameSpace.I_BridgeWCFService">
  61.           <identity>
  62.             <userPrincipalName value="GOD" />
  63.           </identity>
  64.         </endpoint>
  65.         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  66.       </service>
  67.     </services>
  68.     <behaviors>
  69.       <serviceBehaviors>
  70.         <behavior name="_BridgeNameSpace.Service1Behavior">
  71.           <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
  72.           <serviceMetadata httpGetEnabled="true"/>
  73.           <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
  74.           <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
  75.           <serviceDebug includeExceptionDetailInFaults="false"/>
  76.         </behavior>
  77.       </serviceBehaviors>
  78.     </behaviors>
  79.   </system.serviceModel>
  80.   <system.web>
  81.     <compilation debug="true"/>
  82.   </system.web>
  83. </configuration>
  84.        
  85. MyServiceClientProxy Proxy = null;
  86. MyCallbackProxy myCallbackProxy = null;
  87.  
  88. myCallbackProxy = new MyCallbackProxy();
  89. InstanceContext cntx = new InstanceContext(myCallbackProxy);
  90. Proxy = new MyServiceClientProxy(cntx, "WSDualHttpBinding_I_BridgeWCFService");
  91. Proxy.ClientCredentials.Windows.ClientCredential.UserName = "GOD";
  92. Proxy.ClientCredentials.Windows.ClientCredential.Password = "yy";
  93. try
  94. {
  95. Proxy.Open();
  96. }
  97. catch { return; }
  98.        
  99. The open operation did not complete within the allotted timeout of 00:00:59.1689524. The time allotted to this operation may have been a portion of a longer timeout.