I have a c# API service deployed to an Azure cloud service. It uses various settings configured in the csdef and cscfg files, and I can update them in the settings section of the azure portal. I have a need to programatically update some settings (to change a password, for example).
I know I can do this using PowerShell, but can I do it using just C# code in my API?
See Microsoft.WindowsAzure.Management.Compute.ComputeManagementClient.ChangeConfigurationBySlot(...)
Related
I builded a REST-API which uploads images to my azure storage container. My azure storage container is secured an access key, which I use in my POST method like this:
StorageCredentials storageCredentials = new StorageCredentials("[storage]", "[key]");
Now I want to deploy my service to the azure cloud - but I dont know how to manage the security issue with my plain written access key in the POST method.
Where should I save sensitive data like this? Or are my worries wrong
and this is not an issue?
Info:
The REST-API is a ASP.NET Web API Project
Azure portal => your web app => Configuration => Application Settings
That is the simplest.
You can also use a keyvault, but the application settings are the easiest by far, and perfectly fine for this case.
For ASP.NET and ASP.NET Core developers, setting app settings in App
Service are like setting them in in Web.config or
appsettings.json, but the values in App Service override the ones in
Web.config or appsettings.json
You can read more about it here: https://learn.microsoft.com/bs-latn-ba/azure/app-service/configure-common
I need to be able to deploy bot framework solution fully automatically from a .net web app.
The resources I am able to create with ease (using Microsoft.Azure.Management.Fluent) are:
app service plan
Web App with bot backend
azure storage
The resources that I want (and can't) are:
"Wab App Bot"
"Cognitive Service" with LUIS (this one is optional for know, but it would be really great if I can also create this kind of resource from code)
I have configured service principal with necessary rights.
You can find the code samples to create Azure app bot and Cognitive Service under the SDKs.
Azure app bot https://github.com/Azure/azure-sdk-for-net/tree/psSdkJson6/src/SDKs/BotService
Azure Cognitive Service https://github.com/Azure/azure-sdk-for-net/tree/psSdkJson6/src/SDKs/CognitiveServices
My though on this to enable the continious deployment for the bt code using GitHub or AzureDevOps, following link will help you set up the CD for the bot
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-build-continuous-deployment?view=azure-bot-service-4.0
As for the LUIS application, what I end up doing is to use PowerShell / C# app to deploy the LUIS app definition using the LUIS REST api https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c2f
I have been struggling to find some resources that help explain, how we use the File Storage with Web App Service.
There are ways to use it with the old Web Roles, Check here (Using the Azure File Service in your Cloud Services (Web and Worker Roles)).
However, there is NO OnStart() methods in "Azure Web Service".
If you're looking for mapping a drive to your Azure File Service share in your Web App using SMB protocol, then I don't think you can do as of today.
What you could do is make use of Azure File Service REST API and manipulate shares and files that way. You don't have to actually use the REST API per se; you can simply use the latest version of .Net Storage Client library which is a wrapper over REST API.
Please see this link for more details on how to use this using Storage Client library: https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-files/.
Yes, you can. In Linux Web Apps and Windows Containers Web Apps only.
In the Web App, under Application Settings you will find Mount storage (Preview) section where you can mount Storage account. Works like a charm.
I have been using Visual Studio to manage and develop an application that runs on a Windows Azure web role. It's an ASP.Net WebApi Application that connects to a backend SQL Azure Database. The code base is hosted on GitHub.
I have read about Monaco and its ability to edit Windows Azure Web Sites but I have not seen any references to the tool being used or able to be used to change a Web Role.
Is this possible with Monaco?
That feature is built into the Azure environment for Websites only. The deployment model for Web and Worker Roles differs substantially from that used for Websites.
I have an existing Web Site hosted on Azure that works with Azure Cloud services. I am now trying to integrate it with ACS for Identity Management. When attempting to configure through the Identity and Access Manager, I only have 2 options:
Use the Local Development STS to test your application
Use a business identity provider (e.g. Windows Azure Active Directory, ADFSv2)
However, I need the 3rd option that is typically available: "Use the Windows Azure Access Control Service". I've created new web sites in the exact same format, and have that option. But for some reason with this existing one it does not show up.
Is there anything in particular in my configuration settings that might not be allowing this?
Did you created any identity provider?
Please check the following article to get more detail :
http://blog.tomasjansson.com/configuring-windows-azure-active-directory-access-control