小编Eva*_*ula的帖子

如何使用ARM模板为我的Azure Web应用程序设置"仅限Https"?

我知道如何在Azure门户中手动设置Https.导航到我的Web应用程序>自定义域在Azure的门户开放自定义域窗格中,其中有一个"仅HTTPS"选项.将此选项设置为"On"可启用我要查找的功能.我在Benjamin Perkins博客上找到了如何手动执行此操作.遗憾的是,它不包含如何使用ARM模板以自动方式解决问题的说明.

如何在我的ARM模板中设置此"仅Https"标志,以便我可以在部署中自动执行此设置?假设我已经有一个有效的ARM部署,只需要知道为此设置专门添加到模板的位置和内容.

我想保留基于ARM模板的方法的答案.

谢谢你的时间!

azure azure-web-sites azure-resource-manager azure-web-app-service

8
推荐指数
1
解决办法
2612
查看次数

Azure 服务总线“ReceiveAsync”

有没有办法使用Microsoft.Azure.ServiceBus包来等待当前线程从队列中接收消息?

这可能更多地是我的理解和希望以不打算使用的方式使用该技术的问题,但我想做的是结合以下 Microsoft 示例中的发送和接收示例,以便您可以将消息发送到各种队列,并能够侦听和处理“回复”(只是您在队列中收听的消息)并在您完成接收消息后关闭连接。

这里有一些伪代码:

   // send message(s) that will be consumed by other processes / applications, and by doing so later on we will expect some messages back
   await SendMessagesAsync(numberOfMessages);

    var receivedMessages = 0;
    while (receivedMessages < numberOfMessages)
    {
        // there is no "ReceiveAsync" method, this is what I would be looking for
        Message message = await queueClient.ReceiveAsync(TimeSpan.FromSeconds(30));
        receivedMessages++;

        // do something with the message here
   }

   await queueClient.CloseAsync();
Run Code Online (Sandbox Code Playgroud)

这是可能的还是我“做错了”?

c# azure azureservicebus azure-servicebus-queues

5
推荐指数
1
解决办法
4521
查看次数

Azure SQL创建数据库范围的凭据

我正在尝试使用SSMS在Azure SQL中创建作用域凭证。

CREATE DATABASE SCOPED CREDENTIAL [cred-name] WITH IDENTITY = [db-user], SECRET = 'password'
Run Code Online (Sandbox Code Playgroud)

我不断遇到错误消息,指出“'cred-name'附近的语法不正确。预期为'='。” 我不确定我的语法是不正确的,因为我过去已经成功完成了此确切命令,所以我不确定发生了什么变化。我以为可能只是intellisense搞砸了,所以我将SSMS实例从17.3更新到17.7,但仍然收到相同的错误消息。

有谁知道可能会发生什么变化?

sql azure azure-sql-database

5
推荐指数
1
解决办法
4209
查看次数

将 35GB Redis 从一个实例复制到另一个实例的最快方法(在 Azure 标准中)

我们在 Azure 上有两个 Azure Redis 实例。源位于 Azure 中的“标准”设置。我们需要将所有 35GB 从标准版本复制到高级版本(而不是迁移)。

最好的方法是什么?数据应该是静态的。您无法以标准方式导出数据,也无法进行分片。我们已经达到了最大大小,需要迁移到支持分片的大小。

azure redis azure-redis-cache

4
推荐指数
1
解决办法
4119
查看次数

Python Azure 队列,出现错误

我正在努力解决编码问题。我仍在尝试找出Python3的编码方案。我正在尝试将 json 对象从 Python 上传到 Azure 队列中。我正在使用Python3

我制作了 json 对象

response = {"UserImageId": 636667744866847370, "OutputImageName": "car-1807177_with_blue-2467336_size_1020_u38fa38.png"} 
queue_service.put_message(response_queue, json.dumps(response))
Run Code Online (Sandbox Code Playgroud)

当它到达队列时,我收到错误

{"imgResponse":"The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. ","log":null,"$return":""}
Run Code Online (Sandbox Code Playgroud)

所以我必须做其他事情,因为显然我需要对我的字符串进行 Base64 编码。所以我尝试

queue_service.put_message(response_queue, base64.b64encode(json.dumps(response).encode('utf-8')))
Run Code Online (Sandbox Code Playgroud)

我得到

TypeError: message should be of type str
Run Code Online (Sandbox Code Playgroud)

来自 Azure 存储队列包。如果我检查上述语句的类型,它是字节类型(有意义)。所以我的问题是,如何将 json 对象编码为队列服务能够理解的内容。我真的希望能够保留 _ 和 - 和 。图像名称中的字符。

python base64 azure python-3.x azure-storage-queues

3
推荐指数
1
解决办法
2396
查看次数

我可以从本地工作站安装Azure文件存储吗?

我想将Azure Files Storage挂载到我的本地Workstation.此时的文档似乎并不清楚.

文件说明

某些Internet服务提供商可能会阻止端口445

似乎证明了这个szenario,但是net usedons不工作localy(Azure VM工作正常).

我收到此错误:

"无法找到网络名称"

文档:https://github.com/Azure/azure-content/blob/master/articles/storage/storage-dotnet-how-to-use-files.md#mount-the-file-share-from-an-本地客户端运行的窗口

编辑:

  • 本地工作站使用Windows 10 Pro运行
  • 命令是net use <drive-letter>: \\<storage-account-name>.file.core.windows.net\<share-name> /u:<storage-account-name> <storage-account-key>它适用于同一区域和订阅中的Azure实例.

编辑2:

它有效,但只有一次!重启后我遇到了同样的问题.针对SMB端口的TCP Ping仅获得了azure vm.

本地工作站

Test-NetConnection -ComputerName SHARENAME.file.core.windows.net -Port 445
TcpTestSucceeded       : False
Run Code Online (Sandbox Code Playgroud)

Azure VM

Test-NetConnection -ComputerName SHARENAME.file.core.windows.net -Port 445
TcpTestSucceeded       : True
Run Code Online (Sandbox Code Playgroud)

看来,我的ISP阻止了端口445.

azure azure-storage azure-storage-blobs azure-table-storage azure-files

2
推荐指数
1
解决办法
4433
查看次数