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

Configuring an Access Control Service Authentication Provider for Salesforce

$
0
0

We have an on premise WCF with a relay configured on Service Bus.  The relay works with both SAS and ACS security.

On the other end, we have a salesforce lightening connect interface that needs to call the service using oAuth security.  When trying to configure an Access Control Service Authentication Provider in Salesforce, the following information is required:

Provider Name:
URL Suffix:
Consumer Key:
Consumer Secret:
Authorize Endpoint URL:
Token Endpoint URL:

Full details in this article

https://help.salesforce.com/HTViewHelpDoc?id=sso_provider_microsoft.htm&language=en_US

If anyone has sucessfully configured ACS security to work with salesforce, your help would be greatly appreciated.

Thanks.


Service Bus Session ReceiveBatchAsync only receiving 1 message

$
0
0

Originally posted http://stackoverflow.com/questions/35187172/service-bus-session-receivebatchasync-only-receiving-1-message

I'm using a Service Bus queue with Sessions enabled and I'm sending 5 messages with the same SessionId. My receiving code uses `AcceptMessageSessionAsync` to get a session lock so that it will receive all the messages for that session. It then uses `session.ReceiveBatchAsync` to try and get all the messages for the session. However, it only seems to get the first message, then when another attempt is made, it gets all the others. You should be able to see that there is a gap of almost a minute between the two batches even though all these messages were sent at once: 

    Session started:AE8DC914-8693-4110-8BAE-244E42A302D5
    Message received:AE8DC914-8693-4110-8BAE-244E42A302D5_1_08:03:03.36523
    Session started:AE8DC914-8693-4110-8BAE-244E42A302D5
    Message received:AE8DC914-8693-4110-8BAE-244E42A302D5_2_08:03:04.22964
    Message received:AE8DC914-8693-4110-8BAE-244E42A302D5_3_08:03:04.29515
    Message received:AE8DC914-8693-4110-8BAE-244E42A302D5_4_08:03:04.33959
    Message received:AE8DC914-8693-4110-8BAE-244E42A302D5_5_08:03:04.39587

My code to process these is a function in a WebJob:

    [NoAutomaticTrigger]    public static async Task MessageHandlingLoop(TextWriter log, CancellationToken cancellationToken)    {        var connectionString = ConfigurationManager.ConnectionStrings["ServiceBusListen"].ConnectionString;        var client = QueueClient.CreateFromConnectionString(connectionString, "myqueue");        while (!cancellationToken.IsCancellationRequested)        {            MessageSession session = null;            try            {                session = await client.AcceptMessageSessionAsync(TimeSpan.FromMinutes(1));                log.WriteLine("Session started:" + session.SessionId);                foreach (var msg in await session.ReceiveBatchAsync(100, TimeSpan.FromSeconds(5)))                {                    log.WriteLine("Message received:" + msg.MessageId);                    msg.Complete();                }            }            catch (TimeoutException)            {                log.WriteLine("Timeout occurred");                await Task.Delay(5000, cancellationToken);            }            catch (Exception ex)            {                log.WriteLine("Error:" + ex);            }        }    }

This is called from my WebJob `Main` using:

    JobHost host = new JobHost();
    host.Start();
    var task = host.CallAsync(typeof(Functions).GetMethod("MessageHandlingLoop"));
    task.Wait();
    host.Stop();

Why don't I get all my messages in the first call of `ReceiveBatchAsync`?


Auditing solution using Service Bus

$
0
0

Hi,<o:p></o:p>

Need valuable suggestion for one of the requirement: Actually we have one requirement to move application auditing solution into azure using service bus. Application already have trigger based auditing mechanism where it’s been doing customization to audit info and inserting data to three audit-tables; but this approach putting performance impact on overall application.<o:p></o:p>

No we are looking something to be leveraged from available cloud solutions, might be using service bus. It would be great if I could get some guidance on this on this and how to proceed further.<o:p></o:p>

Kind Regards,<o:p></o:p>

Prashant Rai <o:p></o:p>

CommunicationException on Service Bus queue

$
0
0

I have developed a webjob which sends messages to Dynamics Marketing by placing them on a service bus queue. I have multiple instances of the webjob running. When I place multiple messages on the service bus queue it works fine when the webjob is deployed in my personal Azure subscription. But when the webjob is executed in the customers azure subscription I receive the below described error message. Any idea how to solve this issue?

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Program.ProcessQueueMessage ---> NN.CIP.Common.SdkClient.QueuePeekException: Cannot connect to queues. See inner exception for details. ---> Microsoft.ServiceBus.Messaging.MessagingCommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt lasted for a time span of 00:00:00. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.ServiceModel.CommunicationException: Could not connect to net.tcp://[mynamespace].servicebus.windows.net:9354/. The connection attempt lasted for a time span of 00:00:00. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalBind(EndPoint localEP) at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) at System.ServiceModel.Channels.SocketConnectionInitiator.ConnectAsyncResult.StartConnect() --- End of inner exception stack trace --- 


Kindly describe the ideal way to process the service bus (topic) messages parallely

$
0
0

Hello,

Kindly describe the ideal way to process the service bus (topic) messages parallely.

1. We would require a mechanism wherein the above could be achieved within a multi threaded environment.

2. Could you also please shed some light on the AppFabric and the mechanism of ListenURI in context with Service BUS Topics/Subscriptions. 

3. Would utilizing the AppFabric & ListenURI fundamental support/enhance multithreaded/parallel processing messaging architecture.

Please give elaborate and to the point solutions only!

Sample code snippets would be greatly appreciated.

Regards,

Tanveer


tanveersaudagar

Calling SubscriptionClient.Close() doesn't stop message pump

$
0
0

I am calling SubscriptionClient.Close() on an initialize subscription but when I send a message to it, the Message() function is still being called and I am getting my BrokeredMessage. Any reason why this would be?

Thanks,

Ralph

Service Bus Relay Disaster Recovery using Traffic Manager

$
0
0

Hi

We are planning to create a failover for our Service Bus Relay configuration in different region so that if the whole region goes down, something like Traffic manager can switch the traffic to different region.

The question here is, can we use Traffic Manger over Service Bus Relay for Failover setup? If yes, any link articles to help would be appreciated.

Please note, we are trying to avoid code changes to achieve this failover.

Thanks, Piyush


Piyush Gupta

Azure Service Bus Connection Error from Worker Role

$
0
0

We have Azure worker role which is accessing messages from Azure Service Bus Topic. This process is reading some messages from one Topic & sending some message to another Topic.

This was working properly till now. Suddenly we are getting below error-

The underlying connection was closed: An unexpected error occurred on a receive. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc) at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential) at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint) at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback asyncCallback, Object asyncState) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult1.b__49(GetAsyncResult1 thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)

Some other details of environment-

.Net Framework - 4.0 Worker Role osFamily="3" and osVersion="*"

We have tried following options-

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;

But this does not resolved the issue.

Thanks

Dharam


dharampal sikhwal


Problem starting message broker during service broker configuration

$
0
0

Hi,

after a successful Installation of Service Broker 1.0 i started with its configuration.

The farm creation was also successful but not the step when the Services are started. First it took a Long time for processing. Finally this error message was shown:

Fehler beim Starten des Diensts Service Bus Message Broker: Der Vorgang wurde nicht abgeschlossen, da derTimeout abgelaufen ist.

To find out what really happend i found this Errors in the Event log:

1:

TrackingId: 90a3b7eb-21e2-4420-a873-036f6cfc98ee, SubsystemId: NoSystemTracker. Failed to open Messaging Host Component System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> System.Fabric.FabricException: A communication error caused the operation to fail. ---> System.Runtime.InteropServices.COMException: Ausnahme von HRESULT: 0x80071BBC

   bei System.Fabric.Interop.NativeClient.IFabricServiceManagementClient.EndGetServiceDescription(IFabricAsyncOperationContext context)

   bei System.Fabric.FabricClient.ServiceManagementClient.GetServiceDescriptionEndWrapper(AsyncCallOutAdapter adapter)

   bei System.Fabric.Interop.Utility.FinishNativeAsyncInvoke[TResult](String functionTag, Func`2 endFunc, TaskCompletionSource`1 source, AsyncCallOutAdapter adapter, Boolean expectCompletedSynchronously)

   --- Ende der internen Ausnahmestapelüberwachung ---

   --- Ende der internen Ausnahmestapelüberwachung ---

   bei System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHelper.WaitForFabricReady(FabricClient fabricClient, Uri uri)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHelper.CreateServiceInstances(MessagingManagementProviderConfig messagingManagementProviderConfig)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHostComponent.Open()

---> (Interne Ausnahme #0) System.Fabric.FabricException: A communication error caused the operation to fail. ---> System.Runtime.InteropServices.COMException: Ausnahme von HRESULT: 0x80071BBC

   bei System.Fabric.Interop.NativeClient.IFabricServiceManagementClient.EndGetServiceDescription(IFabricAsyncOperationContext context)

   bei System.Fabric.FabricClient.ServiceManagementClient.GetServiceDescriptionEndWrapper(AsyncCallOutAdapter adapter)

   bei System.Fabric.Interop.Utility.FinishNativeAsyncInvoke[TResult](String functionTag, Func`2 endFunc, TaskCompletionSource`1 source, AsyncCallOutAdapter adapter, Boolean expectCompletedSynchronously)

   --- Ende der internen Ausnahmestapelüberwachung ---<---

2:

ServiceBus Broker service failed to start, retry count 1.  Exception message: Mindestens ein Fehler ist aufgetreten..  Stack Trace:    bei System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHelper.WaitForFabricReady(FabricClient fabricClient, Uri uri)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHelper.CreateServiceInstances(MessagingManagementProviderConfig messagingManagementProviderConfig)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.MessageContainerHostComponent.Open()

   bei Microsoft.Cloud.HostingModel.ComponentHost.OpenComponent(IComponent component, RequestTracker tracker)

   bei Microsoft.Cloud.HostingModel.ComponentHost.Open()

   bei Microsoft.ServiceBus.MessageBroker.Backend.OnStart(String[] args)

3:

Windows Fabric service registration failed. Exception System.Fabric.FabricException: Service type is already registered. ---> System.Runtime.InteropServices.COMException: Ausnahme von HRESULT: 0x80071BD1

   bei System.Fabric.Interop.NativeRuntime.IFabricRuntime.RegisterStatefulServiceFactory(IntPtr serviceType, IFabricStatefulServiceFactory factory)

   bei System.Fabric.FabricRuntime.InternalRegisterServiceFactory(Boolean isStateful, String serviceType, ServiceFactoryBroker serviceFactoryBroker)

   bei System.Fabric.FabricRuntime.RegisterServiceTypeHelper(Boolean isStateful, String serviceTypeName, Type serviceTypeImplementation)

   bei System.Fabric.Interop.Utility.<>c__DisplayClassad.<WrapNativeSyncInvoke>b__ac()

   bei System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag)

   --- Ende der internen Ausnahmestapelüberwachung ---

   bei System.Fabric.Interop.Utility.WrapNativeSyncInvoke[TResult](Func`1 func, String functionTag)

   bei Microsoft.Cloud.ServiceBus.MessageContainerHost.Ring.Join()


I suppose that this last message 3 is not the reason for the Problem, but the first communication Problem.

Can You please help me to find out the reason for this problems!

Thank You in advance

Alex 

Service Bus Relay to on-premise WCF using HTTPS

$
0
0

Hi,

We have an on premise WCF REST service hosted on IIS 8.5.  The application pool for the service is set as follows:

StartMode=AlwaysRunning
AutoStart=true
The system.applicationHost/sites configuration has the following settings for the service:

preLoadEnabled=true
serviceAutoStartEnabled=true

When deploying the WCF service without any security, the autostart feature works and the relay endpoint is automatically created in service bus:

 <webHttpBinding>
        <binding name="webHttpBindingConfig">
          <security mode="None">          
          </security>          
        </binding>
      </webHttpBinding>

However, when we change the configuration to use Transport security with a certificate, the relay is NOT created automatically:

<webHttpBinding>
        <binding name="webHttpBindingConfig">
          <security mode="Transport">
            <transport clientCredentialType="Certificate">
            </transport>
          </security>
        </binding>
      </webHttpBinding>

We have to invoke the service manually by requesting it through the browser and then the relay is created in service bus. Although we have enabled SSL on the IIS server and added it to the endpoint address as below, we do not see the relay created with HTTPS:

<endpoint address="https://<hostname>.fabrikam.com/service/test.svc" binding="webHttpBinding" bindingConfiguration="webHttpBindingConfig" contract="System.Data.Services.IRequestHandler" name="webHttpBinding" />

Are we missing something here or does the binding have to be a TCP binding in order for the service bus to create an HTTPS relay endpoint over port 9351 as  stated in this article:

http://stackoverflow.com/questions/11106169/is-https-supported-with-connectivitymode-http-on-the-azure-servicebus

Thanks for your help.

Messages from the queue not been removed.

$
0
0

Hi, 

I have an azure service bus queue where CRM 2016 Dynamics writes messages to the queue and have a web job which processes the messages. I am able to process the messages but after calling Complete method the message from queue is not been removed. 

How do I troubleshooting or find out why processed messages are not been removed from the queue. 

The web job is a console application running in a while loop waiting for messages to arrive in a queue.

How can I clear the Session State

$
0
0

SetState accepts a stream as it's parameter to persist the Session state between handling messages for that session.

But when I know the last message has been received how do I set the state to null?

Attempting to pass an empty string to SetState causes an error.


Certificate requested with thumbprint xxx not found in the certificate store. Certificate was deleted as it had expired.

$
0
0

The certificate for the server hosing the Service Bus expired two days ago and did not auto renew. This is because we changed to a new CA last year and decommissioned the old CA. As a result of this then the service bus services had stopped and would not start. 

I manually renewed the SSL certificate for the server and deleted the old certificate (deleting was a mistake)

If I now try to use powershell to change the certificate (Set-SBCertificate) or use any other commands I get the error message:

Certificate requested with thumbprint
F78F8E609D8E552636449031410177B066364D5B not found in the certificate store. 

I guess the thumbprint is for the old certificate which I deleted.

I there any way to recover from this?

If I manage to restore the deleted certificate, can this issue be resolved? 

thank you.

Remote Server returned an error: (500) Internal Server Error

$
0
0

From @sfeldman via Twitter:

ASB EastUS is misbehaving this morning: 

Microsoft.ServiceBus.Messaging.MessagingException : The remote server returned an error: (500) Internal Server Error. The server was unable to process the request; please retry the operation. If the problem persists, please contact your Service Bus administrator and provide the tracking id. TrackingId:66e4454b-92a5-44a4-97a1-a6c4817648d2_G4,TimeStamp:2/23/2016 2:56:25 PM
  ----> System.Net.WebException : The remote server returned an error: (500) Internal Server Error.

Thanks!

@AzureSupport

How do you remove / clear out Windows Service bus message queues

$
0
0

Hello,

I have a Windows Service Bus 1.1 installed on my PC.

Just wondering how to remove the message queues - as I am having problem with my application.

How would you do it from scratch?

Thank you

Kevin



Azure Service Bus relays on Linux

$
0
0

Hello everyone,

I am currently hosting on premises WCF services on Azure service bus relays, soon we will develop a RESTful services on Linux and wondering how we do that on Linux platform?

Thanks

Custom Time To Live (header TTL) ignored on messages if over a day.

$
0
0
I've been playing with making messages expire at difference times, and what I've found is that if you set a TTL over a day in a message, it basically ignores your TTL and just makes it a day instead, at least according to the Service Bus Explorer.  Is that a phantom constraint on the Azure ServiceBus, or am I doing something wrong?

Run a simple C sample on Intel Edison

$
0
0

Hi all , I am trying to connect a intel Edison to IOT hub as to documentation on Azure at Git 

https://github.com/Azure/azure-iot-sdks/blob/26e81a7a3358815bfee9553678f546ffe6f3d3ce/c/doc/run_sample_on_intel_edison.md

it says to

Navigate to: ~/cmake/iothub_client/samples/iothub_client_sample_amqp

and

./iothub_client_samples_iothub_client_sample_amqp

but this folder have nothing to run

I found a .c file of it in  azure-iot-sdks/c/iothub_client/samples/iothub_client_sample_amqp

but it says I don't have permission , and I try it with gcc command but it says :

gcc ./iothub_client_sample_amqp.cthub_client/samples/iothub_client_sample_amqp#
./iothub_client_sample_amqp.c:7:27: fatal error: iothub_client.h: No such file or directory
 #include "iothub_client.h"
                           ^
compilation terminated.
cd \@pe3iot:~/azure-iot-sdks/c/iothub_client/samples/iothub_client_sample_amqp#

but in cmaker folder, I have iothub client folder , I have run

$ ./build_proton.sh
$ ./build.sh

successfully and copy libqpid-proton.so.2 to lib ,

my cmaker >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

root@pe3iot:~# cmake --version
cmake version 3.4.0

gcc:>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

root@pe3iot:~# gcc --version
gcc (GCC) 4.9.1 

have tried Updated instructions too at

https://github.com/Azure/azure-iot-sdks/pull/212/files?short_path=af74a54

make all file changes it says but I was unable to run "make -f makefile.linux" with error

make: makefile.linux: No such file or directory
make: *** No rule to make target 'makefile.linux'.  Stop.

I notice that Documentation on Edison rarely updated (or any , don't starters deserve more support ?)

Thanks in Advance

Azure IOT Hub consume device to cloud messages

$
0
0

Hello

Can I consume messages from an IOT Hub endpoint with HTTP rest?

Greeting Nathan

Azure Worker Role crash due to ObjectDisposedException not properly handled

$
0
0

Hello,

Today we spotted a strange Azure worker role crash. A call stack doesn't contain our code, only the code from ServiceBus. Has anyone seen such problem? I'm interested in root cause since this is the first time our time saw it. MessageOptions.AutoComplete = false, MaxConcurrentCalls = 10, AutoRenewTimeout = 30 seconds.

Any ideas?

Thanks,

Anton

The stack trace:

2016-02-27 11:59:38.7975 FATAL TID:29 [iCRM.Sdol.SyncWorkerRole.WorkerRole] UnhandledException, IsTerminating:True. EXCEPTION OCCURRED:
System.ObjectDisposedException: BrokeredMessage has been disposed.
   at Microsoft.ServiceBus.Messaging.MessageReceivePump.DispatchAsyncResult.<>c__DisplayClass59.<OnProcessingTimeout>b__58()
   at Microsoft.ServiceBus.Messaging.MessageReceivePump.DispatchAsyncResult.OnProcessingTimeout(Object state)
   at Microsoft.ServiceBus.Common.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlappedCallback)
   at Microsoft.ServiceBus.Common.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
[JobId:NA] | [iCRM.Sdol.SyncWorkerRole.WorkerRole.CurrentDomainOnUnhandledException]

Viewing all 1916 articles
Browse latest View live


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