有没有人让 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;
……但这没什么区别……
谢谢你。