简体   繁体   中英

Authorization error while deploying web app to azure

Deploying my web app results in this error:

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

The application works correctly when used locally. The error happens when building the angular bundle :

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

How can I not be authorized?

To avoid this error you may download the publish profile file (which includes the correct user name and password) from the Azure portal and then import this xxx.PublishSettings file for Web deployment in your Visual Studio.

在此处输入图片说明

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM