Tuesday

msmq set permissions c#

 
private void CreateQueue(string qname)
{
try
{
if (!MessageQueue.Exists(qname))
{
MessageQueue.Create(qname);
MessageQueue messageQueue = new MessageQueue(qname);
//messageQueue.SetPermissions("Everyone", MessageQueueAccessRights.FullControl);
messageQueue.SetPermissions("Local Service", MessageQueueAccessRights.FullControl);

}
}
catch (Exception e)
{

Debug.Write("Failed to setup queue:" + qname + ":" + e.ToString());
}

}


No comments:

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...