Azure Local Development Queue ConnectionString

I created a new WorkerRole using a template for QueueWorkerRole in VS 2013, and it creates code that looks like this:

        // Create the queue if it does not exist already
        var connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString");
        var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);
        if (!namespaceManager.QueueExists(QueueName))
        {
            namespaceManager.CreateQueue(QueueName);
        }

        // Initialize the connection to Service Bus Queue
        _client = QueueClient.CreateFromConnectionString(connectionString, QueueName);

The problem I am facing is setting Microsoft.ServiceBus.ConnectionString correctly so that it works with my local development queues running in the emulator. By default, it sets this as follows:

<appSettings>
    <!-- Service Bus specific app setings for messaging connections -->
    <add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedSecretIssuer=owner;SharedSecretValue=[your secret]" />
</appSettings>

And I assume that this will work fine when I have a hosting service to connect, but I just test some things locally and cannot connect it.

"UseDevelopmentStorage = True", , "127.0.0.1:10001", , : http://www.connectionstrings.com/windows-azure/ (DefaultEndpointsProtocol = https; AccountName = devstoreaccount1; AccountKey = Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw ==;) .

" " Compute Emulator, , .

.

+4
1

, , , Service String Creator Connection. .

, , , : "UseDevelopmentStorage = true", : Windows Azure ASP.NET MVC? STORAGE ( )

+1

All Articles