Hi, You can also try retrieving batches of 100 users with:
service.RetrievePageOfUsers(string startUsername) http://code.google.com/intl/es-CO/apis/apps/gdata_provisioning_api_v2.0_reference_dotnet.html#Retrieve_100_Users_in_Domain_Example David NCCFred wrote: > Hello Everyone, > > Really quick question, I currently have 14,591 users in my domain. > When I run the function RetrieveAllNicknames_Click, I get a my file > with all 14,588 Nicknames (the other 3 do not have Nicknames). This > takes about 10 minutes to complete .. I know I can have multiple > threads sharing the same Auth token, but right now I'm not too > concerned on the time factor. > > I try the RetrieveAllUsers() function and after some amount of time > (less than 3 minutes) I get "A first chance exception of type > 'Google.GData.Client.GDataRequestException' occurred in > Google.GData.Apps.dll" Exception for a Time out reached. > > I have 2 questions: > > 1. Why would I be getting this for the RetrieveAllUsers() and not the > RetrieveAllNicknames(). > > 2. Is there something I'm doing incorrectly, I could have sworn this > worked last month. > > Below are the two functions I use to grab the data and dumb it into a > text file. > > > private void RertieveAllButton_Click(object sender, EventArgs > e) > { > // Query for all users. > UserFeed feed = Global.GoogleConnect().RetrieveAllUsers(); > > string fileName = "C:\\allUsers.txt"; > StreamWriter allUsers = new StreamWriter(fileName); > > for(int i=0; i < feed.Entries.Count; i++) > { > UserEntry entry = feed.Entries[i] as UserEntry; > allUsers.WriteLine(entry.Login.UserName); > } > > > allUsers.Close(); > MessageBox.Show("File Created"); > } > > private void RetrieveAllNicknames_Click(object sender, > EventArgs e) > { > NicknameFeed feed = Global.GoogleConnect > ().RetrieveAllNicknames(); > > StreamWriter NicknameStream = new StreamWriter("C:\ > \AllNicknames.txt"); > > for (int f = 0; f < feed.Entries.Count; f++) > { > NicknameEntry entry = feed.Entries[f] as > NicknameEntry; > NicknameStream.WriteLine((f + 1) + "," + > entry.Login.UserName + "," + entry.Nickname.Name ); > } > > NicknameStream.Close(); > MessageBox.Show("File Created"); > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Apps APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-apps-apis?hl=en -~----------~----~----~----~------~----~------~--~---
