Last post Oct 29, 2017 03:59 PM by D.Eason
Oct 26, 2017 02:05 AM|D.Eason|LINK
Hello everyone and thanks for your help in advance.
I try to use windows Powershell invoke the kudu rest api, but is show me this error:
the user name and password are come from the publish setting file
I also try to re-set the publish setting file, but not success.
Oct 26, 2017 07:27 AM|Zhi Lv - MSFT|LINK
Welcome to asp.net forum.
401-unauthorized: access is denied due to invalid credentials
According to your Power shell script, I suppose the issue is related to the username.
Since the deployment username contains a '$' in the beginning, then PowerShell will treats it as a local variable instead of a literal string.
To escape the username, we need to add a '`(backtick)' in front of the $ sign. Like this:
$username = "`$websitename"
Oct 29, 2017 03:59 PM|D.Eason|LINK
Thanks, it works.