c# - Problems with transactionScope and ServiceBus in production environment -


I have seen the other with similar issues, but I have not found any work solution yet.

I am using UnitOfWork / EntityFramework for my database.

This is my code

  / * list and adding to the unit author / repository / using .... (Transaction Scope = New Transaction ()) {_unitOfWork.Save (); ExportGroups (myGroupList); Scope.Complete (); }   

and here is a piece from the ExportGroups function

  Public Zero ExportGroups (IEnumerable & lt; Groups & gt; Groups) {/ * Generated BrokeredMessage Messages * / Task .Factory.StartNew ((=) = {MessagingFactory factory = CreateMessagingFactory (...), if (factory = null) {var this = factory.CreateMessageSender (TOPICNAME);; sender.Send (message); }}) stop(); }   

This works without any problem in my development environment but when we put it into production I get the following error

"System.InvalidOperationException: Local Transactions are not supported with other resource managers / DTC "

Machine capable of DTC and we use it to fix other transactions, although none of these uses the service bus.

[EDIT = Added Stack Trace]

  Server stack trace: Microsoft.ServiceBus.Messaging.Sbmp.SbmpResourceManager.EnlistAynyncResult..ctor (SbmpResourceManager resource managers, transaction Lane -den, Aiarkest session channel, SbmpMessageCreator messageCreator, action `1 split InfoSetter, timezone timeout, Async callback callback, object state) on .SbmpResourceManager.BeginEnlist on Microsoft.ServiceBus.Messaging.Sbmp (transaction transaction, IRequestSessionChannel channel, SbmpMessageCreator messageCreator, Action`1 partitionInfoSetter, TimeSpan Timeout, AsyncCallback Callback, Object State) Microsoft.ServiceBus.Messaging.Sbmp.SbmpTransa CtionalAsyncResu on Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1 at Microsoft Lieutenant Step on SteelBus.Messaging (current ThreadType position). Lt.11 & Lt; & Gt; C__DisplayClass3e & Lt; GetAsyncSteps & gt; B__38 (TIteratorAsyncResult thisPtr, Microsoft from OperatorCalacC, Object S) IteratorAsyncResult`1.Start () exception in Microsoft at Microsoft. [0]: Microsoft restored on. ServiceBus.Common.AsyncResult.End [TAsyncResult] (IAsyncResult result) at Microsoft. ServiceBus.Messaging.Sbmp.SbmpMessageSender.EndSendCommand (IAsync Results). Microsoft servicebus Messaging Sbimpi Sbimmsejaseder Kondend (IAsyncResult result) Kanukrmit stages (currently ThreadType position Microsoft.ServiceBus.Messaging.IteratorAynyncResult`1) exception [1 Retrieved on]: Microsoft. Servicebees. Asynchronous rsh Finally [TAsyncResult] Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.RunSynchronously (on Microsoft.ServiceBus.Messaging.MessageSender.Send on System.Threa) (trackingContext trackingContext, IEnumerable`1 message, timed TimeSpan) to (IAsyncResult result) ding.Tasks.Task.Execute () --- inner exception System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout at the end of the stack trace --- System.Threading.Tasks.Task.Wait, CancellationToken cancellationToken) (a) At .... GroupService.ExportGroups (IEnumerable & lt; Group & gt; Groups)    

< P> Transactions are not supported in entire Windows Azure services.

HH! Mr.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -