Hi Fred,

You can try manually increasing the timeout for your UserService
instance in the AppsService class.

UserService userService = new UserService("demo app");
userService.SetAuthenticationToken("....");
  GDataRequestFactory factory = (GDataRequestFactory)
      userService.RequestFactory;
  factory.Timeout = 600000; //millisecond value

Also, it would be helpful for us if you can share the implementation
of Global.GoogleConnect().RetrieveAllUsers();

On a side note, for the number of user entries you have, buffering
your data in a StringBuffer instance and writing it to the output file
in bigger chunks can also help optimize the file writing process.

-Anirudh

On Dec 30, 1:26 am, NCCFred <[email protected]> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to