Esempio n. 1
0
 public Inline(EmailSubmissionServiceClient proxy)
 {
     _proxy = proxy;
 }
        public EmailSubmissionServiceClient proxy(string scheme, string path)
        {
            EmailSubmissionServiceClient c = null;

            UriBuilder ub = new UriBuilder();

            ub.Scheme = scheme;
            ub.Path = path;
            ub.Host = HOST;

            EndpointAddress endPoint = new EndpointAddress(ub.Uri, new SpnEndpointIdentity(string.Empty));

            HttpBindingBase binding;

            if (scheme == HTTPS_SCHEME)
            {
                 binding = new BasicHttpsBinding();
                 //((BasicHttpsBinding)binding).
                ((BasicHttpsBinding)binding).Security.Mode = BasicHttpsSecurityMode.Transport;
                ((BasicHttpsBinding)binding).Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
            }
            else
            {
                 binding = new BasicHttpBinding();
                 ((BasicHttpBinding)binding).Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
                 ((BasicHttpBinding)binding).Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
            }

            c = new EmailSubmissionServiceClient(binding, endPoint);
            c.ClientCredentials.UserName.UserName = USER;
            c.ClientCredentials.UserName.Password = PWD;

            c.Open();

            if (c.InnerChannel != null)
            {
                c.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(60);
            }

            return c;
        }
Esempio n. 3
0
 public Ping(EmailSubmissionServiceClient proxy)
 {
     _proxy = proxy;
 }
Esempio n. 4
0
 public Chunk(EmailSubmissionServiceClient proxy)
 {
     _proxy = proxy;
 }