简体   繁体   English

使用 Asp.net mvc 以编程方式创建 Azure 服务总线

[英]Programitcally Creating Azure Service Bus using Asp.net mvc

I am trying to programmatically create an Azure service bus, however, I am not sure whether it is possible to create or not.我正在尝试以编程方式创建 Azure 服务总线,但是,我不确定是否可以创建。

If it is possible, then it would be very much helpful if someone can describe the way in which it can be created.如果可能的话,如果有人可以描述它的创建方式,那将非常有帮助。

Currently, I am trying to create it through asp.net MVC.目前,我正在尝试通过 asp.net MVC 创建它。

I would highly recommend creating infrastructure such as Azure Service Bus via automated steps such as from a deployment pipeline (eg from Azure DevOps) using ARM templates or using the Azure CLI if ARM templates are not an option for you. I would highly recommend creating infrastructure such as Azure Service Bus via automated steps such as from a deployment pipeline (eg from Azure DevOps) using ARM templates or using the Azure CLI if ARM templates are not an option for you. (See here for further documentation on this topic https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-resource-manager-namespace-topic-with-rule ) (有关此主题的更多文档,请参阅此处https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-resource-manager-namespace-topic-with-rule

Although I would usually not recommend it (but then again, I do not know your motives) you can also create namespaces, topics and subscriptions from code.虽然我通常不会推荐它(但话说回来,我不知道你的动机)你也可以从代码中创建命名空间、主题和订阅。 You can find samples here: https://github.com/Azure-Samples/service-bus-dotnet-manage-publish-subscribe-with-basic-features/blob/master/Program.cs您可以在此处找到示例: https://github.com/Azure-Samples/service-bus-dotnet-manage-publish-subscribe-with-basic-features/blob/master/Program.cs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM