I've created a an App Service using the Azure portal and wanted to download the Publish Profile (to import that into Visual Studio). But the download button is disabled. Any suggestions?
My Scenario:- I'm using Visual Studio 2022 community edition. I was trying to publish the website to the 'Azure App Service' but it was throwing 'connected to the remote computer but could not authorize the remote server returned an error 401 unauthorized' error. I realized that it was due to the publish profile and when i went to the azure portal i saw that 'Download publish profile' was disabled.
Fix:- Below are the steps that solved the issue for me.
- Select Azure Web app which you have created.
- Under settings --> Configuration --> "General settings" -->turned off "Basic Auth Publishing Credentials" --> Save
- Navigate back to "Overview" --> Restart webapp.
- Navigate back to settings--> Configuration-->"General Settings" -->turned on "Basic Auth Publishing Credentials". --> Save
- Finally, I restarted the web app and "Download publish profile" appeared for me
- Once it was enabled in the azure portal, when i published website by clicking 'Publish' button, I was also able to successfully publish my web app from Visual Studio.
Somehow there might be a glitch when new webapp is created.
If anyone is looking for a February 2024 version of the solution to this nonsense, it might have updated as recently they did some changes around kudu deployment.
- Select Azure Web app which you have created.
- Under settings | Configuration | "General settings", Ensure that both SCM Basic Auth Publishing and FTP Basic Auth Publishing are "ON". --> Save
- Navigate back to "Overview" --> STOP web app.
- (Publishing Profile should be come available now)
- Restart your application
For some unknown reason, in first attempt it's not working for me. But when I tried to do on/off 3-4 times and did restart, then I could download the publish profile.
Looks like it is available on the dashboard of the new portal. You need to hover over your function app tile and go into the menu as seen in the photo.
ISSUES: I have created one Azure web app service with a deployed code option. The web app was created successfully and is running fine.
When you tried to Download the publish profile. You get the following error. Basic authentication is disabled. enter image description here
Create one web application project in Visual Studio 2019 and test it locally. It worked fine. However, when I tried to publish this web application code from VS-2019, got the below error. Web deployment task failed. (Connected to the remote computer ("asiley-webtest.scm.azurewebsites.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.)Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.Error details:Connected to the remote computer ("asiley-webtest.scm.azurewebsites.net") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site. Learn more at: https://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.The remote server returned an error: (401) Unauthorized. enter image description here
RESOLUTION: One of the reason of this problem is Basic Auth Publishing setting. If it is disable then you get such issue. Please follow the steps to enable Basic Auth Publish Setting.
- Login portal go to the App Service and select Created Web App service
- In Settings section select the Configuration
- In the right panned check the ON option of a. SCM Basic Auth Publishi b. FTP Basic Auth Publishin
- Save and restart the web app application.
© 2022 - 2024 — McMap. All rights reserved.