Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Authorization needed to call TopicClient.SendBatch (Service Bus 1.0 for Window Server)

$
0
0

Hi,
I'm using Service Bus 1.0 for Windows Server (on premise) and I am tring to call TopicClient.SendBatch().
In the (Windows) user making the call is 'manage user' on the entire namespace, the call works fine.

If the user has onlysend and listen rights on a specific topic, the call toTopicClient.SendBatch() throws the following exception:
Unhandled Exception: System.UnauthorizedAccessException: 40100: Unauthorized.TrackingId:ed93d168-36a8-4357-b4755b0d679a2165_G******_G******,TimeStamp:19.12.2013 13:37:00 ---> System.ServiceModel.FaultException: 40100: Unauthorized. TrackingId:ed93d168-36a8-4357-b475-5b0d679a2165_G*******_G********,TimeStamp:19.12.2013 13:37:00

If I call TopicClient.Send(), with the above permissions, the call works fine.

The send and listen permissions are granted from code, as follows: 

topicDescription.Authorization.Add(
       new AllowRule("NamespaceName", "nameidentifier", "machine\\username", 
new List<AccessRights> { AccessRights.Listen, AccessRights.Send }));

All users are local Windows users, not domain accounts - no special permissions, just simple accounts members of the local 'Users' group. Both the client and the SB server are on the same machine.

Does anyone know if this is expected, or if the authorization should be set-up in another way?
---------------------------

The full stack trace is:

System.UnauthorizedAccessException occurred
  HResult=-2147024891
  Message=40100: Unauthorized.TrackingId:d2f234f1-b8bf-4b4b-8abf-a1dea7da11ff_G****-PC,TimeStamp:19.12.2013 15:44:41
  Source=Microsoft.ServiceBus
  StackTrace:
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand(IAsyncResult result)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.OnEndSend(IAsyncResult result)
       at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.OnSend(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
       at Microsoft.ServiceBus.Messaging.MessageSender.Send(TrackingContext trackingContext, IEnumerable`1 messages, TimeSpan timeout)
       at Microsoft.ServiceBus.Messaging.MessageSender.SendBatch(IEnumerable`1 messages)
       at Microsoft.ServiceBus.Messaging.TopicClient.SendBatch(IEnumerable`1 messages)
       at...
  InnerException: System.ServiceModel.FaultException
       HResult=-2146233087
       Message=40100: Unauthorized.TrackingId:d2f234f1-b8bf-4b4b-8abf-a1dea7da11ff_G****-PC,TimeStamp:19.12.2013 15:44:41
       Source=Microsoft.ServiceBus
       Action=http://schemas.microsoft.com/servicebus/2010/08/protocol/Fault
       StackTrace:
         Server stack trace: 
            at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.ThrowIfFaultMessage(Message wcfMessage)
            at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.HandleMessageReceived(IAsyncResult result)
         Exception rethrown at [0]: 
            at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
            at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
         Exception rethrown at [1]: 
            at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
            at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r)
            at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
         Exception rethrown at [2]: 
            at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
            at Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory`1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.<GetAsyncSteps>b__4(RequestAsyncResult thisPtr, IAsyncResult r)
            at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
         Exception rethrown at [3]: 
            at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
            at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.EndRequest(IAsyncResult result)
            at Microsoft.ServiceBus.Messaging.Sbmp.SbmpTransactionalAsyncResult`1.<GetAsyncSteps>b__36(TIteratorAsyncResult thisPtr, IAsyncResult a)
            at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
         Exception rethrown at [4]: 
            at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
            at Microsoft.ServiceBus.Common.AsyncResult`1.End(IAsyncResult asyncResult)
            at Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand(IAsyncResult result)



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>