System.ArgumentException, value not found

Jan 3, 2009 at 10:14 AM
Hi everyone....i'm developing with facebook dev toolkit my first web application (VS 2005), but when i get my friends i get the same errors...
System.ArgumentException non è stata gestita dal codice utente
  Message="Impossibile trovare il valore '..qualepolitica!?..' richiesto."
       in System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
       in Facebook.Parser.UserParser.ParseUser(XmlNode node)
       in Facebook.API.FacebookAPI.GetUserInfo(String userIds)
       in Facebook.API.FacebookAPI.GetFriends()
       in Facebook.Components.FacebookService.GetFriends()
       in _Default.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\Alfred1234\Documenti\Visual Studio 2005\WebSites\WebSite1\Default.aspx.cs:riga 66
       in System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       in System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       in System.Web.UI.Control.OnLoad(EventArgs e)
       in System.Web.UI.Control.LoadRecursive()
       in System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

(Desktop and web app have the same error). What can i do to solve this problem???
Thank you.
Jan 3, 2009 at 11:41 AM
If you post your code mayby we could point you in the right direction...
Jan 3, 2009 at 11:49 AM
it's the same of sample webpage.aspx or app desktop...with GETFRIENDS() function
Jan 3, 2009 at 12:25 PM
Can't really help then, i deleted those off my PC a long time ago.

A quick copy/paste of code would be helpfull
Jan 3, 2009 at 1:07 PM

this is the code of default.aspx


FacebookService _fbService = new Facebook.Components.FacebookService();





protected void Page_Load(object sender, EventArgs e)



_fbService.ApplicationKey =



_fbService.Secret =



_fbService.IsDesktopApplication =




string sessionKey = Session["facebook_session_key"] as String;



string userId = Session["facebook_userId"] as String;




// When the user uses the facebook login page,



// the redirect back here will will have the auth_token in the query params



string authToken = Request.QueryString["auth_token"];



if (!String.IsNullOrEmpty(sessionKey))



_fbService.SessionKey = sessionKey;

_fbService.UserId = userId;



else if (!String.IsNullOrEmpty(authToken)) {




"facebook_session_key"] = _fbService.SessionKey;



"facebook_userId"] = _fbService.UserId;



"facebook_session_expires"] = _fbService.SessionExpires;








@"" + _fbService.ApplicationKey + @"&v=1.0");




if (!IsPostBack)




// Use the FacebookService Component to populate Friends


FriendList1.Friends = _fbService.GetFriends();


Jan 3, 2009 at 5:03 PM
Is this the 1.7 version of the toolkit? Back then we were trying to parse all political attitudes into an enum, but that didn't really work since it was a free-form field, and people entered new political affiliations faster than we could keep up with them. This was fixed in the 2.0 version of the toolkit, but be warned that that version has some major interface changes, so if you have much code written in the old version, it's probably incompatible. Unfortunately, though, it looks like upgrading to the new toolkit might be your only way around this issue.
Jan 4, 2009 at 10:13 AM
ok, now works fine... :) with VS2008...with 2005 tells me...file not found...mah...boh.... :) thanks a lot...