Example #1
0
		public void SetPermissions (MessageQueueAccessControlEntry ace)
		{
			throw new NotImplementedException ();
		}
Example #2
0
 public void SetPermissions(MessageQueueAccessControlEntry ace)
 {
     throw new NotImplementedException();
 }
Example #3
0
 /// <summary>
 /// Assigns access rights to the queue based on the contents of an access control entry.
 /// </summary>
 /// <param name="ace">A <see cref="T:System.Messaging.MessageQueueAccessControlEntry"/> that specifies a user, an access type, and a permission type. </param><exception cref="T:System.Messaging.MessageQueueException">An error occurred when accessing a Message Queuing method. </exception><PermissionSet><IPermission class="System.Messaging.MessageQueuePermission, System.Messaging, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Unrestricted="true"/></PermissionSet>
 public void SetPermissions(MessageQueueAccessControlEntry ace)
 {
     _queue.SetPermissions(ace);
 }
        /// <summary>
        ///  Create the transacted MSMQ queue if necessary.
        /// </summary>
        /// <param name="queuePath"></param>
        void CreateQueue(string queuePath)
        {

            try
            {
                if (!MessageQueue.Exists(queuePath))
                {
                    MessageQueue.Create(queuePath, true);

                    // Create a new trustee to represent the "system" user group.
                    Trustee tr = new Trustee("SYSTEM");
                    MessageQueueAccessControlEntry entry = new MessageQueueAccessControlEntry(tr, MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow);
                    // Apply the MessageQueueAccessControlEntry to the queue.
                    SysEventQueue.SetPermissions(entry);
                    
                    if (!string.IsNullOrEmpty(Properties.Settings.Default.AdministratorGroupName))
                    {
                        tr = new Trustee(Properties.Settings.Default.AdministratorGroupName);
                        entry = new MessageQueueAccessControlEntry(tr, MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow);
                        SysEventQueue.SetPermissions(entry);
                    }
                }

            }
            catch (MessageQueueException ex)
            {
                ReceivedInfoProc.LogError(ex);
          
            }
        }