Microsoft.Xml.Schema.Linq.XTypedList

Aug 13, 2008 at 1:45 PM

I have this error  :

Le type 'Microsoft.Xml.Schema.Linq.XTypedList`1[[facebook.Schema.user, facebook, Version=2.0.3142.23334, Culture=neutral, PublicKeyToken=null]]' dans l'assembly 'Microsoft.Xml.Schema.Linq, Version=0.10.1000.0, Culture=neutral, PublicKeyToken=null' n'est pas marqué comme sérialisable.

[SerializationException: Le type 'Microsoft.Xml.Schema.Linq.XTypedList`1[[facebook.Schema.user, facebook, Version=2.0.3142.23334, Culture=neutral, PublicKeyToken=null]]' dans l'assembly 'Microsoft.Xml.Schema.Linq, Version=0.10.1000.0, Culture=neutral, PublicKeyToken=null' n'est pas marqué comme sérialisable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +2700482
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +245
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +88
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +175
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +50
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +438
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +131
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3010

[ArgumentException: Erreur de sérialisation de la valeur 'Microsoft.Xml.Schema.Linq.XTypedList`1[facebook.Schema.user]' de type 'Microsoft.Xml.Schema.Linq.XTypedList`1[[facebook.Schema.user, facebook, Version=2.0.3142.23334, Culture=neutral, PublicKeyToken=null]].']
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3217
System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +126
System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +52
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4
System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37
System.Web.UI.HiddenFieldPageStatePersister.Save() +106
System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +82
System.Web.UI.Page.SaveAllState() +550
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2357

when :

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using facebook;
using facebook.Components;
using facebook.web;

public partial class _Default : CanvasIFrameBasePage
{
   //FacebookService _fbService = new FacebookService();

   private const string FACEBOOK_API_KEY = "6702581d17ee3e3a7867f451a010ace3";  // From the Facebook application page
   private const string FACEBOOK_SECRET = "ce883a0c69bbdfeda678a8b416e76305";  // From the Facebook application page

     

    protected void Page_Load(object sender, EventArgs e)
    {
        base.Api = FACEBOOK_API_KEY;
        base.Secret = FACEBOOK_SECRET;
        base.Page_Load(sender, e);



        if (!IsPostBack)
        {
            // Use the FacebookService Component to populate Friends
            var friends = this.API.friends.getUserObjects() ;
            FriendList1.Friends = friends;
        }

    }
}

Could you help me