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

Getting service bus connectionstring at run time

$
0
0
Using a management certificate I have found a way to enumerate all the Service bus namespaces associated with a subscription id.  What I am looking to do next is to gather some information about each namespace.  What is stopping me is that I don't know how to get the connection string.  A NamespaceManager can be created this way:

NamespaceManager nsm = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString("connection string");

or

Uri uri = ServiceBusEnvironment.CreateServiceUri("sb"...;
TokenProvider tokenProvider = TokenProvider.CreateSharedSecretTokenProvider(owner, key);
NamespaceManager namespaceManager = new NamespaceManager(uri, tokenProvider);

And these work fine if I provide the data.  What I would really like to do is get the data needed at run time.  Assuming the certificate has the rights to do this how can it be accomplished?  If not the certificate, what rights are required and still, what calls are available to get the data I am looking for?

Thanks

Rig Lee



Viewing all articles
Browse latest Browse all 1916

Trending Articles



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