小编Jan*_*wak的帖子

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

如何在没有门户的情况下获取函数URL

从我之前关于“功能未在门户中显示”的问题(编译的功能未在门户中显示)我现在面临的问题是,因此我无法使用门户来获取“功能 URL”和功能键进行授权。有没有办法在不访问门户的情况下获取功能密钥?

我知道通过 KUDU 我可以使用密钥读取 JSON 文件,但这些文件是加密的,我不知道如何解密它们。

干杯大卫

azure azure-functions

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

以编程方式停止Azure功能并再次启动它

我有一个azure函数,它从服务总线队列中读取消息,并使用该消息向API发送请求.这很好用.

由于我们无法控制的因素,有时API可能无法访问.有没有办法阻止Azure功能从队列中接收更新或完全停止执行,直到理想情况下通过api调用或环境变量重新启动?

c# azure azureservicebus azure-functions

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

如何在Azure门户上调试Azure函数?

我创建了一个Azure函数。我可以在没有Visual Studio的情况下在Azure门户上调试Azure功能吗?

我正在传递一个复杂的参数作为文件模型,我必须查看调试模式下参数值中会出现什么?

azure azure-functions

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

当我使用存储表的输入绑定时,如何访问RowKey(和PartitionKey)?

当我使用带有存储表的输入绑定而没有错误"隐藏继承的成员'TableEntity.RowKey"时,如何访问RowKey(和PartitionKey)?

我可以愉快地基于PartitionKey访问类别,但是当我尝试扩展到获取RowKey时,通过向我的类添加新属性,我收到错误... warning CS0108: 'Person.RowKey' hides inherited member 'TableEntity.RowKey'. Use the new keyword if hiding was intended.

#r "Microsoft.WindowsAzure.Storage"
using Microsoft.WindowsAzure.Storage.Table;
public static void Run(string myQueueItem, 
                      IQueryable<Person> tableBinding, TraceWriter log)
{
    log.Info($"C# Queue trigger:triggerblocklist processed message : [{myQueueItem}]");
    // int i = tableBinding.Count(); 
    // log.Info($"{i}");

    foreach (Person person in tableBinding.Where(p => p.PartitionKey == myQueueItem)
           .ToList())
    {
        log.Info($"RowKey:     [{person.RowKey}]");
        log.Info($"Categories: [{person.Categories}]");
    }
}
public class Person : TableEntity
{
    // public string PartitionKey { get; set; }
    public string RowKey { …
Run Code Online (Sandbox Code Playgroud)

azure azure-storage azure-table-storage azure-functions

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

从Azure Function调用我自己的DLL,支持.NET Framework版本

什么是最高的.NET Framework版本,我可以编译我的DLL(它当然是F#)?如果它是4.6,那是否意味着我可以在4.6.1,4.6.2下编译?我已经尝试过4.6.1了.也许这有效,我的问题与我的下一个问题有关:

我已经尝试将dll和依赖文件放在myFunction/bin/myDll /*.*中并且当前由

\#r "bin/myDll/myDll.dll" 
Run Code Online (Sandbox Code Playgroud)

在函数中,根据我的Azure函数中的Reference c#类库应该可以工作.

这似乎也不起作用.我更喜欢应用服务级别的bin,所以我的所有功能都可以引用相同的dll.

我错过了function.json中的绑定吗?如果您可以在settings.json或host.json中将这些设置放在应用程序服务级别,那将是很好的

我正在寻找技术问题的答案,以及它在哪里记录?

f# azure azure-functions

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

解析 Azure 函数中的 URL

我正在学习如何使用 Azure 函数,对它还很陌生。我有一个用 NodeJs 编写的 httptrigger Azure 函数。我正在考虑如何从 httptrigger 函数 URL 解析数据并在我的代码中使用它的逻辑。想对此提出一些建议吗?

简单来说,

  1. 我想知道如何将字符串参数传递给函数 URL。
  2. 然后解析 URL 中的字符串并在我的代码逻辑中使用它。

azure urlparse node.js azure-functions

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

AzureFunctions 绑定到 SendGrid

试图弄清楚如何从 azure 函数中使用 SendGrid。找不到太多文档,但这是我尝试过的:

#r "SendGrid"
using SendGrid.Helpers.Mail;
using System;

public static void Run(string myQueueItem, out Mail message, TraceWriter log)
{
    log.Info($"C# Queue trigger function processed: {myQueueItem}");
    message=new Mail();
}
Run Code Online (Sandbox Code Playgroud)

我已经对主题和正文以及集成输出部分中的 api 密钥进行了硬编码。这是我的function.json:

{
"bindings": [
{
  "name": "myQueueItem",
  "type": "queueTrigger",
  "direction": "in",
  "queueName": "send-email-request",
  "connection": "myStorage"
},
{
  "type": "sendGrid",
  "name": "message",
  "apiKey": "SG.xxxxxxxxxxx",
  "direction": "out",
  "to": "me@gmail.com",
  "from": "me@gmail.no",
  "subject": "hardcoded",
  "text": "test213"
}
],
"disabled": false
}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Function ($SendEmailOnQueueTriggered) Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.SendEmailOnQueueTriggered'. Microsoft.Azure.WebJobs.Host: …
Run Code Online (Sandbox Code Playgroud)

azure sendgrid azure-functions

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

Azure函数:NodeJS - HTTP响应呈现为XML而不是HTML

我有一个节点azure函数与function.json像这样:

{
  "disabled": false,
  "bindings": [
    {
      "name": "req",
      "type": "httpTrigger",
      "direction": "in",
      "methods": [ "get" ]
    },
    {
      "name": "res",
      "type": "http",
      "direction": "out"
    }
  ]
}
Run Code Online (Sandbox Code Playgroud)

我希望函数返回html给我一个这样的页面: 在此输入图像描述

但是,当我像这样写index.js时:

module.exports = function (context, sentimentTable) {
    context.res = {
        body: "<!DOCTYPE html> <html> <head> </head> <body> Hello World </body> </html>",
        contentType: "text/html"
    };

    context.done();
};
Run Code Online (Sandbox Code Playgroud)

我得到这个:

在此输入图像描述

Azure函数可以返回html吗?

azure node.js azure-functions

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

从Azure Functions中调用HttpUtitility

我正在尝试从Azure Functions中进行REST调用.对于这些代码行:

var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
Run Code Online (Sandbox Code Playgroud)

我收到以下错误.

The name 'HttpUtility' does not exist in the current context
Run Code Online (Sandbox Code Playgroud)

我在Azure.com中使用Web界面.

.net c# rest azure azure-functions

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