首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Windows Mobile >

微软的liveSDK,仿照开发指南登陆代码,报错

2012-07-15 
微软的liveSDK,模仿开发指南登陆代码,报错!用了微软的liveSDK,模仿了Live Connect 开发者指南,想要实现用

微软的liveSDK,模仿开发指南登陆代码,报错!
用了微软的liveSDK,模仿了Live Connect 开发者指南,想要实现用户登录就出问题了.没用登录控件,用LiveAuthClient:

  private static readonly string _ClientId="000000004C0760E7";

  private LiveConnectSession liveSession = null;

  public void LoginSky()
  {
  LiveAuthClient auth = new LiveAuthClient(_ClientId);
  auth.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(auth_LoginCompleted);
  auth.LoginAsync(new string[] {"wl_signin","wl.basic"});
  }

  void auth_LoginCompleted(object sender, LoginCompletedEventArgs e)
  {
  if (e.Status == LiveConnectSessionStatus.Connected)
  {
  liveSession = e.Session;
  LiveConnectClient FolderClient = new LiveConnectClient(e.Session);
  FolderClient.GetCompleted += new EventHandler<LiveOperationCompletedEventArgs>(FolderClient_GetCompleted);
  FolderClient.GetAsync("/me/albums");
  }
  }


输入帐号和密码后出现授权确认,点击确认后出错:
Type 'System.Collections.Generic.Queue`1[System.String]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.

[解决办法]
Consider marking it with the DataContractAttribute attribute

注意看错误提示
你要声明为可序列化。

热点排行