I have a custom (C#) SharePoint Web Part that updates the user's password 
when it is changed. My code is as follows:

using Google.GData.Apps;
using Google.GData.Client;

AppsService service = new AppsService(domain, GAdminusername, 
GAdminpassword);
UserEntry targetUser = service.RetrieveUser(username);
targetUser.Login.Password = password;
service.UpdateUser(targetUser);

I get the following error:

System.NullReferenceException: Object reference not set to an instance of an 
object. at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter) 
at Google.GData.Client.Service.Query(Uri queryUri, DateTime ifModifiedSince, 
String etag, Int64& contentLength) at Google.GData.Client.Service.Query(Uri 
queryUri) at Google.GData.Apps.UserService.Query(UserQuery feedQuery) at 
Google.GData.Apps.AppsService.RetrieveUser(String username)

The AppsService domain and credentials are correct. The username is my own, 
so it exists. In fact, if I put this code in a desktop application, it works 
perfectly.

What would cause this to fail in ASP.NET (SharePoint) and work in a Windows 
Forms Application on the desktop?

I appreciate your help, and I apologize if I've missed a previous post 
addressing this issue. I've searched but found nothing so far.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/MgoxiNlyHjgJ.
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-mgmt-apis?hl=en.

Reply via email to