2

有没有人让 Bing API C# 示例代码工作?我指的是此页面上的 Web 示例:https ://skydrive.live.com/view.aspx?resid=9C9479871FBFA822!112&app=Word&authkey=!ANNnJQREB0kDC04

我也在使用 BingSearchContainer.cs 文件

string rootUri = "https://api.datamarket.azure.com/Bing/Search";

var bingContainer = new Bing.BingSearchContainer(new Uri(rootUri));

var accountKey = "Zasjkdhfkajshdfkjhasdkfjhetc";

bingContainer.Credentials = new NetworkCredential(accountKey, accountKey);

// Build the query:
// Example says "var webQuery = .... I just tried this
DataServiceQuery<WebResult> webQuery = bingContainer.Web("Testing", null, null, null, null, null, null, null);

// This returns a 403
// Example says "var results = .... I just tried this too...
IEnumerable<WebResult> results = webQuery.Execute();

我也尝试过这样的事情:

bingContainer.IgnoreMissingProperties = true;

……但这没什么区别……

谢谢你。

4

1 回答 1

1

你订阅了使用 bing api 吗?请检查以下链接并根据您的要求订阅

https://datamarket.azure.com/dataset/5BA839F1-12CE-4CCE-BF57-A49D98D29A44

于 2014-02-18T14:18:40.450 回答