Esempio n. 1
0
 private static bool TryCreateSecurity(SecurityBindingElement sbe, UnifiedSecurityMode mode, HttpTransportSecurity transportSecurity, bool isReliableSession, out WSHttpSecurity security)
 {
     if (!WSHttpSecurity.TryCreate(sbe, mode, transportSecurity, isReliableSession, out security))
     {
         return(false);
     }
     return(SecurityElementBase.AreBindingsMatching(security.CreateMessageSecurity(isReliableSession, WS2007MessageSecurityVersion), sbe));
 }
Esempio n. 2
0
 // This is effectively just a copy of WSHttpBinding.TryCreateSecurity(), only it passes the 2007 security version
 private static bool TryCreateSecurity(SecurityBindingElement sbe, UnifiedSecurityMode mode, HttpTransportSecurity transportSecurity, bool isReliableSession, out WSHttpSecurity security)
 {
     if (!WSHttpSecurity.TryCreate(sbe, mode, transportSecurity, isReliableSession, out security))
     {
         return(false);
     }
     // the last check: make sure that security binding element match the incoming security
     return(System.ServiceModel.Configuration.SecurityElement.AreBindingsMatching(security.CreateMessageSecurity(isReliableSession, s_WS2007MessageSecurityVersion), sbe));
 }