My hard disc has crashed. Azure functions were written using Visual Studio Code and deployed to the Azure Functions.
However, right now although I can see all the codes but, I am unable to sync it to my new system in Visual Studio Code.
I am using Consumption Plan, Python in Linux OS.
"Download App Content" is disabled in my account.
Yes, Download App Content option is disabled for the Azure Functions Python Linux OS in the Azure Portal.
To download its App Content, you can use the FTP Login like:
Go to the deployment Center > Select FTPS Credentials > Copy FTPS Endpoint, Username and Password to the WinSCP Client > You have the Download option to download all the content.
This is possible when you created the Functions using the Azure Portal (Consumption Function App).
You cannot see the Code files in FTPS Client if you have deployed the Functions from local IDE (VS Code, etc) to the Azure Function App Consumption Plan.
If you have deployed the functions from local IDE to the Portal Function App (App Service Plan & Premium Plan), then you can see the files using FTP Client (eg, WinSCP) using the above method.
Note: You can also get the FTPS endpoint and credentials from the Get Publish Profile option.
Updated Answer:
If you have deployed the functions from local IDE to Portal Function App (Consumption Mode), then the workaround is to copy the code manually from the portal function app to your local project:
As of now, I believe the above is the workaround in that scenario. It is not so easy to do manually if many functions (triggers) are present in the Function App, so I would recommend you raise the feature request in the Azure Functions Python GitHub Repository.
Related
I'm trying to publish an asp.net core app from Visual Studio 2022 to an Azure App Service using Azure AD Microsoft Identity Platform for authentication. At the Microsoft identity platform screen, its showing an error:
Failed to add password. Unable to save changes because the credential
limit has been reached. Please delete a credential and try again.
I'm not seeing where I can "delete" credentials. I'm also not sure if this is from my Azure App Service, or local machine. I searched my App Service on Azure, but couldn't find anything related to this.
Any ideas?
We have tested this in our local environment it is working fine, Below statements are based on our analysis.
We have created an Asp .Net core (in Visual Studio 2022) with managed identity as an authentication type in our local environment.
I'm not seeing where I can "delete" credentials.
I'm also not sure if this is from my Azure App Service or the local machine. I searched my App Service on Azure, but couldn't find anything related to this.
Before publishing the project, if you are configuring the Microsoft identity platform then you see an option to store the secrets in our local environment as shown below.
If you want to list those secrets in our local machine
Run the following command from the directory in which the project file exists:
dotnet user-secrets list
Here is the sample output for reference:
You can refer to this documentation for more information about Safe storage of app secrets in development in ASP.NET Core
If you want to configure the Microsoft identity platform at the time of publishing you will get an option to store this client secret as Azure App setting
As shown in the above GIF, while creating the secret from vs you will select the app registration to which this client secret needs to append.
Once the client secret got created you can check the secret value in the portal by routing to Active Directory > App registrations> select app registration Name(that you choose while creating from vs) >certificates & secrets.
you can delete the secret/credentials from there.
I am new to Azure AD B2C and NodeJS development, but have developed web sites (that does not use frameworks) using JAVA, PHP, C# and C++ for non-cloud servers using Apache or IIS.
I want to build a simple SPA for Azure B2C, that accepts sign-in and sign-up (with federated authentication via google, facebook, etc) using the Authorization Code Flow.
After searching for some time, I found the following example:
https://github.com/Azure-Samples/ms-identity-b2c-javascript-spa
What do they mean when they write the following in the Deployment section:
build your project
Are they assuming that I am using webpack or the like and forgot to describe it or are they assuming that I am familiar with Azure pipelines (which I am not), i.e. this:
https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/javascript?view=azure-devops&tabs=code
Or do they mean something different? How do I build the sample project?
I have tested in my environment.
You can build and deploy your project to Azure Static Website using VS Code.
VS code Azure Storage extension builds and deploys the project to the Azure Storage as a static website
After cloning the project into your local, open command prompt from your project folder.
Run this command to install node modules required for the project :
npm install
Run this command to start the project :
npm start
You can see your project running in http://localhost:6420/
Now to deploy this application to Azure, you can use Azure Storage Account Static website feature.
To deploy the application, please follow below steps :
Open your project from the VS code.
Go to extensions and search for Azure Storage. Select Azure Storage. Click on install.
Sign in to your Azure Account and you can see your subscription.
Under Storage extension, Click on Deploy to Static Website via Azure Storage.
Select your project folder. Select your Subscription.
If storage account is already created, select your storage account. If not click on Create Storage Account (Advanced) and create your storage account.
Click on Enable website hosting
Once the deployment is completed, sign in to Azure Portal.
Open your storage account. Select Containers. Open $web container.
You can see your project uploaded to the Storage Account.
Click on Change access level and select Container ( anonymous read access for containers and blobs). Click OK
Open App folder and click on index.html. Copy the URL
Open the URL in the browser and you should be able to see the application running.
I want do deploy code to Linux App service plan over FTP but I fail because I am missing a step how to "say to app service to use app DLL instead of default one".
Code is copied, I even uploaded test zip file and I can't download it, getting error 404 so how did Microsoft imagine to deploy code over FTP? I couldn't find any info in their documentation regarding this exact case.
I want to avoid using docker file, If this can't be done I'll simply switch to using Windows based App service plan.
In application setting screen of your WebApp mention the startup file name
dotnet
I just need to deploy a aspnet core app into a Linux Service Plan.
I tried pre-creating the Linux service plan (into it's own Resource Group) from portal, and then starting the publish profile creating process in VS, but it does not show the linux Resource Group or Service Plan.
I can only find references to doing this from a Linux machine using Git-integration.
Thanks in advance,
Jose Parra
Unfortunately, for now we cannot deploy web app to Azure linux service plan through VS. It's by design that we can only see windows service plan in VS publish process.
However there are alternatives for us to choose.
FTP-- Upload pre-compiled files(under ~/bin/Debug(Release) folder) to website. Here's the reference.
Local Git--You may have read this tutorial. Note that Git bash can also be used in Windows.
GitHub--Follow this reference to connect VS with your GitHub, then config Deployment option in portal. After that your code will be deployed automatically once pushed to GitHub.
There are some other deployment ways like CI/CD aka Continuous Delivery in portal and another source control tool BitBucket. I recommend you to use GitHub as it's simple to operate in VS after configuration.
I'm trying to automatically deploy from Team Services (was Visual Studio Online) after a successful build a C# program to an azure app service without success.
I can only do it to a cloud service (classic) rather app service.
I've seen that I could plug Team Services directly to the app service with "deployment source" (I did tried so far because both tenant, Team Services & Azure one are different and requires some effort)
but wouldn't it break the normal release / test process from Team Services?
I can only find little information over internet regarding these topics ...
Any help would be appreciated.
You can also add a FTP Upload task in your build definition to publish the output to Azure App Service via FTP Method.
To publish to an Azure App Service, you need to use either of the following Agent tasks:
Here is a walkthrough: https://www.visualstudio.com/en-us/docs/build/apps/aspnet/aspnet4-to-azure
When making a new build definition, it is easiest to choose the Deployment -> Azure WebApp option.