Yes I also got the same error when trying to use the latest .Net SDK
release. It worked okay with the older SDK.
On Apr 23, 1:09 pm, John <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am attempting to write a test program to work with the provisioning
> API. My code really only contains these lines:
>
> AppsService service = null;
>
> try {
> service = new AppsService (domain, user, pass);
> } catch {
> Console.WriteLine ("cought exception");
> }
>
> try {
> UserFeed feed = service.RetrieveAllUsers ();
> } catch {
> Console.WriteLine ("cought exception");
> }
>
> It fails with this:
>
> Unhandled Exception: System.NullReferenceException: Object reference
> not set to an instance of an object.
> at Google.GData.Client.FeedQuery.get_Uri() in D:\Program Files
> \Google\Google Data API SDK\Sources\Library\core\feedqu
> ery.cs:line 224
> at Google.GData.Apps.UserService.Query(UserQuery feedQuery)
> at Google.GData.Apps.AppsService.RetrieveAllUsers()
> at GoogleProvision.GoogleProvision.Main(String[] args) in W:\src
> \MIIS\test\G oogleProvision\GoogleProvision.cs:line 35
>
> Where it is failing is in the UserFeed feed =
> service.RetrieveAllUsers() line. If I use Debug DLL's as references in
> the project and debug, it is failing in the FeedQuery class on this:
>
> String uriToUse =
> this.baseUri.Replace(this.UnusedProtocol, this.DefaultProtocol);
>
> From what I can determine here, it seems that when the UserQuery
> instance is created, baseUri from base class FeedQuery is never
> initialized.
>
> Am I correct in my assumption? I am faily new to C# and .NET but this
> is what looks like the problem to me. Is anyone else having issues
> with this? I can duplicate this behavior by running the sample
> programs provided with the .NET provisioning API as well.
>
> Any help would be greatly appreciated.
>
> - John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---