【问题标题】:Google Spread Sheet Api | Invalid Application name Parameter name: ApplicationNameGoogle 电子表格 API |无效的应用程序名称参数名称:ApplicationName
【发布时间】:2017-06-02 11:15:02
【问题描述】:

我已关注Google APi Tutorial for Dot net。但是在使用相同的步骤执行代码时,在教程中提到的以下代码中,显示了 Invalid application name 异常。

var service = new SheetsService(new BaseClientService.Initializer()
                {
                    HttpClientInitializer = credential,
                    ApplicationName = ApplicationName,
                });

【问题讨论】:

  • 你在 ApplicationName 中传递了什么?
  • 如果你注释掉那一行会发生什么?

标签: asp.net .net google-sheets google-sheets-api


【解决方案1】:

快速入门似乎有一个错误。 ApplicationName 似乎不接受空格。将第 21 行更改为:

    static string ApplicationName = "Google-Sheets-API-Quickstart";

为我工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-22
    • 2010-11-16
    • 2015-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-10
    相关资源
    最近更新 更多