azure

Asp.net core CloudConfigurationManager.GetSetting() is null

╄→尐↘猪︶ㄣ 提交于 2021-02-08 19:16:37
问题 I have an asp.net 4 application where it works fine, but I can't get it working for asp.net core. The documentation says that GetSetting looks in either web.config or app.config file. Storage emulator is turned on. public void ConfigureServices(IServiceCollection services) { AzureConfig.Initialize(); } public static void Initialize() { //Always null var connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); } root web.config file: <configuration> <appSettings>

Asp.net core CloudConfigurationManager.GetSetting() is null

点点圈 提交于 2021-02-08 19:09:24
问题 I have an asp.net 4 application where it works fine, but I can't get it working for asp.net core. The documentation says that GetSetting looks in either web.config or app.config file. Storage emulator is turned on. public void ConfigureServices(IServiceCollection services) { AzureConfig.Initialize(); } public static void Initialize() { //Always null var connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); } root web.config file: <configuration> <appSettings>

Asp.net core CloudConfigurationManager.GetSetting() is null

妖精的绣舞 提交于 2021-02-08 19:08:24
问题 I have an asp.net 4 application where it works fine, but I can't get it working for asp.net core. The documentation says that GetSetting looks in either web.config or app.config file. Storage emulator is turned on. public void ConfigureServices(IServiceCollection services) { AzureConfig.Initialize(); } public static void Initialize() { //Always null var connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); } root web.config file: <configuration> <appSettings>

Asp.net core CloudConfigurationManager.GetSetting() is null

房东的猫 提交于 2021-02-08 19:07:58
问题 I have an asp.net 4 application where it works fine, but I can't get it working for asp.net core. The documentation says that GetSetting looks in either web.config or app.config file. Storage emulator is turned on. public void ConfigureServices(IServiceCollection services) { AzureConfig.Initialize(); } public static void Initialize() { //Always null var connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); } root web.config file: <configuration> <appSettings>

Asp.net core CloudConfigurationManager.GetSetting() is null

妖精的绣舞 提交于 2021-02-08 19:07:39
问题 I have an asp.net 4 application where it works fine, but I can't get it working for asp.net core. The documentation says that GetSetting looks in either web.config or app.config file. Storage emulator is turned on. public void ConfigureServices(IServiceCollection services) { AzureConfig.Initialize(); } public static void Initialize() { //Always null var connectionString = CloudConfigurationManager.GetSetting("StorageConnectionString"); } root web.config file: <configuration> <appSettings>

Azure storage - disable use of authorization header

十年热恋 提交于 2021-02-08 17:06:08
问题 Is it possible to configure Azure storage to ignore the contents of the authorization HTTP header? It seems that Azure always tries to make use of the header value even when configured for anonymous access and receiving pure GET requests. Leaving the field blank is not an option in my scenario. Configure Azure for anonymous access. Use a plugin like Postman to create a GET request. Set the "Authorization" header to a value like "this is a non-azure related authorization header which for

Azure storage - disable use of authorization header

℡╲_俬逩灬. 提交于 2021-02-08 16:58:19
问题 Is it possible to configure Azure storage to ignore the contents of the authorization HTTP header? It seems that Azure always tries to make use of the header value even when configured for anonymous access and receiving pure GET requests. Leaving the field blank is not an option in my scenario. Configure Azure for anonymous access. Use a plugin like Postman to create a GET request. Set the "Authorization" header to a value like "this is a non-azure related authorization header which for

Azure storage - disable use of authorization header

狂风中的少年 提交于 2021-02-08 16:57:23
问题 Is it possible to configure Azure storage to ignore the contents of the authorization HTTP header? It seems that Azure always tries to make use of the header value even when configured for anonymous access and receiving pure GET requests. Leaving the field blank is not an option in my scenario. Configure Azure for anonymous access. Use a plugin like Postman to create a GET request. Set the "Authorization" header to a value like "this is a non-azure related authorization header which for

How to use Moq framework to unit test azure service fabrics?

[亡魂溺海] 提交于 2021-02-08 15:36:37
问题 I am planning to use Moq for unit testing my azure service fabric application. I saw some of the examples here https://github.com/Azure-Samples/service-fabric-dotnet-web-reference-app/blob/master/ReferenceApp/Inventory.UnitTests/InventoryServiceTests.cs. The test I saw seems like actually writing to reliable dictionary and not mocking. Is there way to mock the add/remove from reliable dictionary? How do I unit test something like below public async Task<bool> AddItem(MyItem item) { var items

Where is AccountKey for CosmosDB in Azure portal

痞子三分冷 提交于 2021-02-08 15:17:14
问题 I am trying to migrate mongodb data to Cosmos db. The migration tool I am using, is asking for "AccountKey" required to connect the Cosmosdb. I am not able to get the account key in azure portal. https://portal.azure.com 回答1: You can find the AccountKey from Settings -> ConnectionString -> Primary Password when you click on your cosmosDB resource 回答2: Navigate to Settings -> Keys to view Primary Key as well as Connection String for CosmosDB in Azure Portal 来源: https://stackoverflow.com