将Web应用程序部署到azure时的授权错误

时间:2017-08-16 14:55:37

标签: angularjs azure

部署我的网络应用会导致此错误:

Web deployment task failed. (Connected to the remote computer ("websitenamehere.com") 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: http://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 ("websitenamehere.com") 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: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
    The remote server returned an error: (401) Unauthorized     0

在本地使用时,应用程序可正常工作。 构建角度束时会发生错误:

0% compiling 10% building modules 0/1 modules 1 active ...b\unikyte\src\Unikyte.SPA\src\main.ts
 10% building modules 1/1 modules 0 active1 0% building modules 1/2 modules 1 active ...kyte\src\Unikyte.SPA\src\polyfills.ts 10% building modules 2/2 modules 0 active 10% building modules 2/3 modules 1 active ...nikyte\src\Unikyte.SPA\src\styles.css

我怎能不被授权?

1 个答案:

答案 0 :(得分:1)

要避免此错误,您可以从Azure portal下载发布配置文件(包括正确的用户名和密码),然后在Visual Studio中导入此xxx.PublishSettings文件以进行Web部署。 / p>

enter image description here

enter image description here