Azure的Web作业 - 授权基本报头 [英] Azure Web Job - Authorization Basic Header

查看:402
本文介绍了Azure的Web作业 - 授权基本报头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Azure的Web作业并发布,并与我的Web应用程序相关联。我想创建一个时间表运行每隔一小时。

当我登录到门户网站,我注意到一个新的时间表已创建。它有两个自动标头:

在哪里是基本授权钥匙从何而来?我似乎无法钻进我的Web应用程序下的Web作业选项卡时,发现它。

这也是奇怪的调度程序只允许最低小时间隔为一个基本的Web应用程序。但我可以使用,以相同的凭据获得分钟级处理只需要创建一个新的计划作业。


解决方案

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

参考结果
<一href=\"http://stackoverflow.com/questions/25307232/create-a-scheduled-azure-webjob-with-powershell\">Create一个预定的Azure WebJob使用PowerShell

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.

解决方案

$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

这篇关于Azure的Web作业 - 授权基本报头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆