Пример #1
0
        private void InitializeProxy()
        {
            this.m_proxySoap11UserNameSSL                   = new WinClient.localhost.SecureServiceContractClient("Soap11UserNameSSL");
            this.m_proxySoap12UserNameSSL                   = new WinClient.localhost.SecureServiceContractClient("Soap12UserNameSSL");
            this.m_proxySoap12UserNameOneShot               = new WinClient.localhost.SecureServiceContractClient("Soap12UserNameOneShot");
            this.m_proxySoap12UserNameSecureSession         = new WinClient.localhost.SecureServiceContractClient("Soap12UserNameSecureSession");
            this.m_proxySoap12UserNameSecureReliableSession = new WinClient.localhost.SecureServiceContractClient("Soap12UserNameSecureReliableSession");

            if (!(String.IsNullOrEmpty(m_username) || String.IsNullOrEmpty(this.m_password)))
            {
                this.m_proxySoap11UserNameSSL.ClientCredentials.UserName.UserName = this.m_username;
                this.m_proxySoap11UserNameSSL.ClientCredentials.UserName.Password = this.m_password;


                this.m_proxySoap12UserNameSSL.ClientCredentials.UserName.UserName = this.m_username;
                this.m_proxySoap12UserNameSSL.ClientCredentials.UserName.Password = this.m_password;

                this.m_proxySoap12UserNameOneShot.ClientCredentials.UserName.UserName = this.m_username;
                this.m_proxySoap12UserNameOneShot.ClientCredentials.UserName.Password = this.m_password;

                this.m_proxySoap12UserNameSecureSession.ClientCredentials.UserName.UserName = this.m_username;
                this.m_proxySoap12UserNameSecureSession.ClientCredentials.UserName.Password = this.m_password;

                this.m_proxySoap12UserNameSecureReliableSession.ClientCredentials.UserName.UserName = this.m_username;
                this.m_proxySoap12UserNameSecureReliableSession.ClientCredentials.UserName.Password = this.m_password;
            }
        }
Пример #2
0
        public Form1()
        {
            Thread.GetDomain().SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

            InitializeComponent();

            m_proxy = new WinClient.localhost.SecureServiceContractClient();
            UpdateIdentities();
        }
Пример #3
0
        private void InitializeProxy()
        {
            if (m_proxy != null)
            {
                m_proxy.Close();
            }

            m_proxy = new WinClient.localhost.SecureServiceContractClient();
            UpdateIdentities();
        }
Пример #4
0
 private void cmdGuestOp_Click(object sender, EventArgs e)
 {
     try
     {
         MessageBox.Show(m_proxy.GuestOperation());
     }
     catch (CommunicationException comEx)
     {
         MessageBox.Show(comEx.Message);
         m_proxy = new WinClient.localhost.SecureServiceContractClient();
     }
 }
Пример #5
0
        private void InitializeProxy()
        {
            m_proxySoap11 = new WinClient.localhost.SecureServiceContractClient("BasicHttpBinding_SecureServiceContract");
            m_proxySoap12 = new WinClient.localhost.SecureServiceContractClient("WSHttpBinding_SecureServiceContract");

            if (!(String.IsNullOrEmpty(m_username) || String.IsNullOrEmpty(this.m_password)))
            {
                m_proxySoap11.ClientCredentials.UserName.UserName = this.m_username;
                m_proxySoap11.ClientCredentials.UserName.Password = this.m_password;

                m_proxySoap12.ClientCredentials.UserName.UserName = this.m_username;
                m_proxySoap12.ClientCredentials.UserName.Password = this.m_password;
            }
        }
Пример #6
0
        private void mnuLogin_Click(object sender, EventArgs e)
        {
            SecurityUtility.LoginForm f = new SecurityUtility.LoginForm();

            DialogResult res = f.ShowDialog();

            if (res == DialogResult.OK)
            {
                try
                {
                    ImpersonateUser(f.Username, f.Password, f.Domain);

                    m_proxy = new WinClient.localhost.SecureServiceContractClient();
                    UpdateIdentities();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Пример #7
0
 private void InitializeProxy()
 {
     m_proxySoap11 = new WinClient.localhost.SecureServiceContractClient("BasicHttpBinding_SecureServiceContract");
     m_proxySoap12 = new WinClient.localhost.SecureServiceContractClient("WSHttpBinding_SecureServiceContract");
 }