Here is my scenario Server 1 is on the internal network(in domain) Server 2 is in a DMZ(outside domain)
Server 2 has a private MSMQ that server 1 needs to access. Server 1 request MQ access via a C# console app
My problem is this: How can i create proper security on the MQ(server 2)? Currently I have added a local user with the correct permission, but I cant seem to get C# to impersonate a local user on another server(that properly fair enough)
Any ideas how to autenticate as local user from server 1? Or is there another way to get some decent security on the MQ on server 2.
This is currently my C# code but it do not work as the user cannot be validated on server 1
var credentials = new UserCredentials("ServerIP", "User", "PASSWORD");
Impersonation.RunAsUser(credentials, LogonType.NetworkCleartext, () =>
{
using (MessageQueue messageQueue = new MessageQueue(mqPath))
{ //do stuff to MQ}
}