void sSink_OnManagementAllowed(object sender, ManagementAllowedEventArgs e)
 {
     if (OnManagementAllowed != null)
     {
         OnManagementAllowed(sender, e);
     }
 }
        public void CheckForManagementAllowed(ClientConnectionInfo cci, string clientIpAddress, string extension)
        {
            RijndaelHelper h = new RijndaelHelper(System.Text.Encoding.ASCII.GetString(cci.Provider.Key));

            string extensionNumber = h.Decrypt(extension);

            if (OnManagementAllowed != null)
            {
                ManagementAllowedEventArgs args = new ManagementAllowedEventArgs(clientIpAddress, extensionNumber);

                OnManagementAllowed(this, args);

                if (args.ManagementAllowed == false)
                {
                    throw new Exception("Remote Management not allowed for : " + clientIpAddress);
                }
            }
            else
            {
                throw new Exception("Remote Management not allowed");
            }
        }
Ejemplo n.º 3
0
 void sSink_OnManagementAllowed(object sender, ManagementAllowedEventArgs e)
 {
     if (OnManagementAllowed != null)
     {
         OnManagementAllowed(sender, e);
     }
 }
Ejemplo n.º 4
0
        public void CheckForManagementAllowed(ClientConnectionInfo cci, string clientIpAddress, string extension)
        {
            RijndaelHelper h = new RijndaelHelper(System.Text.Encoding.ASCII.GetString(cci.Provider.Key));

            string extensionNumber = h.Decrypt(extension);
            if (OnManagementAllowed != null)
            {
                ManagementAllowedEventArgs args = new ManagementAllowedEventArgs( clientIpAddress, extensionNumber );

                OnManagementAllowed(this, args);

                if (args.ManagementAllowed == false)
                {
                    throw new Exception("Remote Management not allowed for : " + clientIpAddress);
                }
            }
            else
            {
                throw new Exception("Remote Management not allowed");
            }
        }