【问题标题】:Call HttpUtility from within Azure Functions从 Azure Functions 中调用 HttpUtility
【发布时间】:2017-03-31 14:22:30
【问题描述】:

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

var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);

我收到以下错误。

The name 'HttpUtility' does not exist in the current context

我正在使用 Azure.com 中的 Web 界面。

【问题讨论】:

    标签: c# .net rest azure azure-functions


    【解决方案1】:

    您可能缺少对System.Web 的正确引用:

    #r "System.Web"
    using System.Web; 
    

    Referencing External Assemblies

    【讨论】:

    • 感谢您的快速回复,我有正确的参考。这篇 stackoverflow.com/questions/2405182/… 贴近了,但是我不知道如何在 Azure Functions 中指定完整的框架。
    • Function App 始终以完整框架为目标...我的函数中已成功编译您的代码...
    • 谢谢@Mikhail,你能解释一下#r "System.Web" 还是一些文档的链接
    • @Ryan 添加了链接
    猜你喜欢
    • 2018-09-21
    • 1970-01-01
    • 1970-01-01
    • 2018-05-04
    • 1970-01-01
    • 2020-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多