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.
Related
I know that question is rather amateur but I hope someone will give me a hint what I did it wrong.
I'm using:
Azure SQL Server database - I can access it from Azure db instance from my local SSMS
Azure App Service - also created, up and running
VS22 deployment => Publish => connect to my Azure account, and imported publish profile.
Deployment went well: and the code in release mode is published to Azure App Service.
But I can't see my Swagger page on my Azure website.
I'm using .NET 7
Maybe you can tell me what I'm missing here? Maybe I need to wait for instance of azure app service to be created? although I can access it and use all features that I paid.
Also, my logs are empty
I created a sample webapp in visual studio 2022 using .net 7
Image for reference:
I connected to my Azure sql database from SSMS to the webapp using visual studio.
Image for reference:
It connected successfully. I published it to Azure through Visual studio 2022.
For that I created an app service in azure.
Image for reference:
published into that APP.
Image for reference:
It published successfully.
Image for reference:
It run successfully after deployment.
In portal I go to API-->Api management and created new api for my app.
Image for reference:
I linked the Api Management and click on the Api which I created I got the swagger page
Image for reference:
In this way we can find the swagger page for an App in azure portal.
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.
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 am trying to work with my Azure Cloud Service via Visual Studio 2013. I have connected VS to my Azure account but when I tried to publish the cloud service (brand new project), the wizard doesn't see the already created cloud service. I have tried signing out and back in, quitting VS, both and still doesn't see the cloud service. If I try to Create New and use the same name as the already created cloud service I get a DNS name already taken message.
Any ideas?
The error you're seeing is returned when a cloud service of that name is being used in any subscription, if you're not seeing the cloud service in the dropdown you're probably looking in the wrong place - Ensure that you have selected the subscription in which your cloud service is deployed in the sign-in tab in Visual Studio.
So I setup TFS continuous deployment and I'm running into a situation where my build compiles just alright but fails in the deployment phase when communicating with Azure. My log looks like
Get Default Azure Cloud Service Publish Profile
Set Project to build CSPack
Run MSBuild for Project
Run Visual Studio Test Runner for Test Sources
Publish Output
Deploy application to Azure
8/23/2012 7:20:04 AM - Preparing deployment for rcfoapi with SubscriptionID: mysubscriptionidhere.veryverylong.andkeepsgoing...
8/23/2012 7:20:04 AM - Connecting...
An attempted http request against URI https://management.core.windows.net:8443/mysubscriptionidhere.veryverylong.andkeepsgoing
/services/hostedservices/myrolenamehere?embed-detail=true
returned an error: (403) Forbidden.
Additional Exception Information:
Error Code: AuthenticationFailed
Message: The server failed to authenticate the request. Verify that the
certificate is valid and is associated with this subscription.
Typically, a response of (403) Forbidden from a Windows Azure
Management API means that the X509 certificate used to
authenticate the call is not valid. The certificate may have
been revoked or expired. Reconnect your Windows Azure
subscription to your Team Foundation account.
I tried the 'Disconnect from TFS' link in the Azure portal, then verified that the certificate in the 'certificates' section of the Azure portal. I confirmed using the fingerprint hash that the same certificate is also in my local computers' certificate store ('my' store). Then I relinked TFS back via the Azure portal.
But I still get the same error. Any idea?
Update:
I also tried a few additional steps, nothing seems to be working :(
Deleted the entire cloud service
Created a new cloud service (with same name)
VS2012 deployed to the cloud service on both production and staging (because I need to service operational for front use and back testing)
Verified the Windows Azure Tools certificate in the portal's cloud service 'certificate' section (which matches my local copy). I understand this will be different from the one between TFS and Azure
Went to TFSPreview.com => top left gear => project administration => services => no linked services seen
Went to user profiles => connections => OAuth connection listed (MANAGE-PROD CLOUDAPP by Windows Azure) => removed it
Within the Azure portal, linked the newly setup cloud service back to TFSPreview.com
Locally in VS2012, disconnected TFS ('team' => 'disconnect')
Locally in VS2012, logged out of TFS ('team' => 'connect' => 'sign out' at the bottom)
Signed back into TFS, connected to the team project
Made a trivial change => check in => triggered continuous deploy
=> Same error as before :?
Thanks
TFS Preview is not using the same cert you have on your local dev box. When you connect the accounts Azure gives TFS a different cert and it is possible that is the one that has expired or is no longer there. If you have multiple projects connected to Azure the only option is to go into the admin site on TFSPreview (the gear in the upper right) and disconnect all projects that are connected to that subscription and then rerun the connection wizard. This will ensure we get a new valid certificate for your azure subscription. When you reconnect the subscription to the project we will find the existing build definitions and not create new ones.
I had the same issue and for me the solution was to renew the certificate. See here: http://support.microsoft.com/kb/2780289
This can happen if your certificate needs to be renewed in the Azure control panel.
It can also happen if you don't have a staging or production environment deployed first. I'm not entirely sure why since it deploys a new one, but this fixed the issue for me just now.