Azure Web Job - Authorization Basic Header

泄露秘密 提交于 2019-12-22 11:33:40

问题


I created an Azure Web Job and published and associated with my Web App. I think created a schedule to run every hour.

When I login to the portal, I notice a new Schedule has been created. It has two automatically headers:

Where did that Basic Authorization key come from? I can't seem to find it when drilling into the Web Jobs tab under my Web App.

It's also strange the scheduler only allows for minimum of hour intervals for a "Basic" web app. But I can just create a fresh Scheduled Job using the same credentials in order to get minute level processing.


回答1:


$authPair = "$($site.PublishingUsername):$($site.PublishingPassword)";
$pairBytes = [System.Text.Encoding]::UTF8.GetBytes($authPair);
$encodedPair = [System.Convert]::ToBase64String($pairBytes);

Reference
Create a Scheduled Azure WebJob with PowerShell



来源:https://stackoverflow.com/questions/31168162/azure-web-job-authorization-basic-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!