Thursday, 27 June 2024

Azure - The attempt to publish website and failed with HTTP status code 'Unauthorized'

OR

The attempt to publish the ZIP file through failed with HTTP status code Unauthorized.


When you get this error while publishing the Website, App Services, or Azure Function in Azure Portal. You need to update the settings in Azure Portal.



By default, the publish website is restricted for App Services and Azure Function from Visual Studio, we need to enable the settings.


SCM Basic Auth Publishing Credentials


Go to Azure Portal --> Go to App Services/Azure Functions --> Click Configuration --> Enable SCM Basic Auth Publishing Credentials.























Once you enable the settings, you can publish the website from Visual Studio.






1 comment:

  1. Setia saab thanks for this. You saved my time :-)

    ReplyDelete

Enum with Flag Attribute in .NET

In .NET, you can use the Flags attribute with an enum. You can combine multiple values into one to represent a set of bit fields. It is use...