BingAds API V11 C#项目设置 [英] BingAds API V11 C# Project Setup

查看:167
本文介绍了BingAds API V11 C#项目设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我确认BingAds API V11的C#项目设置步骤吗?

Can someone help me confirm my C# project setup steps for the BingAds API V11?


  • 我已经能够获得我的生产OAuth2工作,现在我正在尝试运行帐户报告请求。 我在名称空间BingAdsExamplesLibrary.V11 ReportRequests.cs类文件中的所有地方都丢失了程序集错误。 我从示例中直接取得了
    ,然后直接使用GitHub版本进行了翻译。
  • 我正在使用Visual Studio 2017 CE。
  • 我的项目正在使用.Net 4.5
  • 我安装了NuGet BingAds软件包,并查看了三个已添加的参考资料:  Microsoft.BingAds,System.Runtime.Serialization和System.ServiceModel。
  • 我还添加了以下生产Web服务URL:

https:/ /reporting.api.bingads.microsoft.com/Api/Advrtiser/Reporting/v11/ReportingService.svc

https://reporting.api.bingads.microsoft.com/Api/Advrtiser/Reporting/v11/ReportingService.svc

不确定还要检查什么。

推荐答案

您好。

示例引用
GitHub
。最简单的方法是克隆存储库并从提供的解决方案开始。然后确保您通过NuGet获得最新的SDK,使用ClientId和DeveloperToken编辑App.config,您应该进行设置。您可以使用WPF或
控制台项目,因为它们都已经引用了BingAdsExamplesLibrary。 

The samples are referencing the solution available on GitHub. The simplest approach is to clone the repository and start with the provided solution. Then make sure you have the latest SDK via NuGet, edit App.config with your ClientId and DeveloperToken, and you should be set. You can either use the WPF or Console project, as they both already reference BingAdsExamplesLibrary. 

如果您想使用自己的解决方案当然没问题我就是很高兴在此过程中提供帮助,例如,

控制台在复制片段时,应用
可能比WPF示例更便携。 

If you want to use your own solution that's fine of course and I'm happy to help along the way e.g., the Console app is probably more portable than the WPF example when it comes to copying over snippets. 

不相关但与您提到的平台相关,请注意,作为
在3月底宣布
我们将要求TLS1.2。 

Unrelated but related to the platform you mentioned, please note that as announced by the end of March we will require TLS1.2. 

对于使用.NET 4.6及更高版本的客户端,默认情况下启用TLS1.2,但请确认是否已修改。 .NET 4.5客户端必须
升级到.NET 4.6或更高版本,或手动设置 
安全
协议
  to TLS1.2 eg,  ServicePointManager.SecurityProtocol
= SecurityProtocolType.Tls12

我希望这有帮助,

Eric


这篇关于BingAds API V11 C#项目设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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