I've written a C# application that puts an XML-object into an MSMQ queue. The queue requires authentication.
MessageQueue queue = GetQueue();
var message = new Message();
message.Formatter = new CustomXMLFormatter();
message.Body = xml.ToString();
message.Label = "From my application";
message.UseAuthentication = true;
queue.Send(message, MessageQueueTransactionType.Single);
This all works today, but now I need to make a change in the way I authenticate. Currently the messages are authenticated using the user that runs the application. However, I want to use a static AD-user istead. (The reason is that the system retriveing the messages needs that all the messages have been added by a single user account).
Is there a way to change which user performs the authentication?