protected virtual string TryGetExplicitLogonNode(ExplicitLogonNode node)
        {
            if (this.ShouldExcludeFromExplicitLogonParsing())
            {
                return(null);
            }
            string text = null;
            bool   nodeIsLast;
            string explicitLogonNode = ProtocolHelper.GetExplicitLogonNode(base.ClientRequest.ApplicationPath, base.ClientRequest.FilePath, node, out nodeIsLast);

            if (!string.IsNullOrEmpty(explicitLogonNode) && this.IsValidExplicitLogonNode(explicitLogonNode, nodeIsLast))
            {
                text = explicitLogonNode;
                ExTraceGlobals.VerboseTracer.TraceDebug <int, string>((long)this.GetHashCode(), "[OwaEcpProxyRequestHandler::TryGetExplicitLogonNode]: Context {0}; candidate explicit logon node: {1}", base.TraceContext, text);
            }
            return(text);
        }
Exemple #2
0
        IRoutingKey[] IAddressFinder.Find(AddressFinderSource source, IAddressFinderDiagnostics diagnostics)
        {
            AddressFinderHelper.ThrowIfNull(source, diagnostics);
            bool   selectedNodeIsLast;
            string explicitLogonNode = ProtocolHelper.GetExplicitLogonNode(source.ApplicationPath, source.FilePath, ExplicitLogonNode.Second, out selectedNodeIsLast);
            string address;

            if (ProtocolHelper.TryGetValidNormalizedExplicitLogonAddress(explicitLogonNode, selectedNodeIsLast, out address))
            {
                IRoutingKey routingKey = new SmtpRoutingKey(new SmtpAddress(address));
                diagnostics.AddRoutingkey(routingKey, "ExplicitLogon-SMTP");
                return(AddressFinderHelper.GetRoutingKeyArray(new IRoutingKey[]
                {
                    routingKey
                }));
            }
            return(AddressFinderHelper.EmptyRoutingKeyArray);
        }