Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@johndowns
Created September 17, 2018 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndowns/123584fce953bfd022999e36a8152d8a to your computer and use it in GitHub Desktop.
Save johndowns/123584fce953bfd022999e36a8152d8a to your computer and use it in GitHub Desktop.
try
{
var serviceBusNamespaceManager = NamespaceManager.CreateFromConnectionString(ConfigurationManager.AppSettings["ServiceBusNamespaceConnectionString"]);
await serviceBusNamespaceManager.GetQueuesAsync();
}
catch (UnauthorizedAccessException ex)
{
return req.CreateResponse(HttpStatusCode.InternalServerError, "The Service Bus namespace key is not valid.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment