Authorization Error 401 - When publishing BOT through Visual Studio 2019

rkhemka 1 Reputation point
2020-09-01T09:08:06.927+00:00

Hi,

I have created a simple Q&A BOT using Azure Portal and Q&A Maker. The BOT is available in Azure and i can test the same in Web Chat.

Now for some customization - i have downloaded the source code of the BOT from Azure and then imported the same to Visual Studio 2019.

Though I have not changed anything in the BOT source code, post i have resolved the dependencies in Visual Studio 2019, i am just trying to republish the BOT back to Azure from Visual Studio.

The BUILD is successful, but it fails to Publish to Azure giving 401 Authorization error.

Web deployment task failed. (Connected to the remote computer ("XXXX-bot.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.)

I even trying getting the Publish Profile form Azure and retrying the same, but still same error.

I also tried validating the connection in Publish Profile from Visual Studio Web Deploy - it gives the same error in Validate Connection button.

Please help me resolve the same.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
833 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 51,696 Reputation points
    2020-09-02T01:48:39.95+00:00

    Hello,

    If you are sure about your user name and password, please check if you have the IIS Manager access to site(if connecting using Web Management Service). Thanks.

    Regards,
    Yutong


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.