0
votes

I am attempting to access a queue and receiving an access denied error. The confusing part is the queue is setup to allow everyone at full control as well as anonymous and machinename$ (all three are full control - it's a test system so not a big deal). I am able to successfully write to the queue but can't Peek/Read/Receive from it. I found one article on here that suggested using the FormatName method but unfortunately I am already doing this.

The catch to this is my system is on one AD domain and the test server is running against another domain entirely (my client's). Am I trying to accomplish the impossible with this?

My platform is Vista x64 and the server is 2008 (not R2).

The code looks like this:

    Do While Not m_boolCancel

        '**Code dies on this line**
        l_ar = m_mq.BeginPeek

        'block thread till message arrived or shutdown is signalled
        If WaitHandle.WaitAny(New WaitHandle() {m_sig, l_ar.AsyncWaitHandle}) > 0 Then

            l_msg = m_mq.EndPeek(l_ar)

            If l_msg IsNot Nothing Then

                'doing stuff here

            End If

            Exit Do
        End If
4

4 Answers

2
votes

For MSMQ to work across domains the domains in question have to have a two way trust established. The message queue has to be a public queue. If you have it set as a transactional queue, both client and server must be using MSMQ 4.0 (part of windows server 2008 and later)

1
votes

Just for the test give anonymous full control.

1
votes

Check the clock between client and server: too big time span may cause an "Access denied".

0
votes

It shouldn't be a problem that the systems are on different domains unless you are using the domain for authentication. What happens when you give "System" full control? Please edit your question to include the code you are using to open the queue and the exact error you receive if this doesn't solve the problem.