System.ArgumentNullException: Value cannot be null.Parameter name: second RRS feed

  • Question

  •  i get this error when reading results from this query. i am using overwritechanges option because its the only way expand actually works.

    DataServiceQuery<Scripts> qScripts = (DataServiceQuery<Scripts>)

    from o in _db.Scripts.Expand("ScriptsToCampaigns")

    select o;

    Thursday, January 15, 2009 8:25 PM


All replies

  • I think this is a known issue, We are looking into it at the moment. Thanks


    Peter Q.
    Thursday, January 15, 2009 11:10 PM
  • hi,

    what is the situation for this problem ? Any patch available ?


    Wednesday, February 18, 2009 7:53 AM
  • I've had this issue today.
    I got it when I tried to expand an empty many-to-many relationship from a specific entity. 

    Dim thisLogin = (From l In _ctx.Logins.Expand("Regions") Where l.LoginID = operatorID Select l).SingleOrDefault() 

    It works fine if I don't use expand and then use LoadProperty.

    Dim thisLogin = (From l In _ctx.Logins Where l.LoginID = operatorID Select l).SingleOrDefault() 
    _ctx.LoadProperty(thisLogin, "Regions"

    It also works fine if there are items in the many-to-many table for the specific entity.

    Is it definitely a bug?  Fixed in the imminent release of 1.5?
    Tuesday, March 17, 2009 2:48 PM
  • Hello Dave,

    Yes, definitely a bug. Currently there is no known walkaround, but it has been fixed already.


    Peter Q.
    Tuesday, March 17, 2009 8:21 PM
  • Hi PQ,

    I've installed v1.5, changed my service app to use the new namespaces and recompiled.
    In my client app I've deleted the service reference and recreated it from the new 1.5-enabled service (Hence the client-side code has been regenerated)

    I still get this error in my client code if I try to use "expand" when retrieving related entities that don't exist.  It works correctly if I just retrieve the entity, then execute "LoadProperty" on each association.

    The error ALWAYS occurs if the association collection is empty (eg, I am retrieving a "region" and I want to expand "contacts" for that region.....For regions that contain 1+ contacts it works fine.  If a region contains 0 contacts it returns this error.  Retrieving the region, then doing LoadProperty on the Contacts collection always works)

    I'm using standard vb.net with VS2008 3.5SP1.

    Friday, March 20, 2009 2:29 PM
  • I have this issue too when I try to Expand a navigation property in a many to many relationship, but it works fine with MergeOptions.AppendOnly but I don't know why!

    Regards ;)
    Tuesday, April 7, 2009 11:10 AM
  • Dave,

    It sounds like you are describing a slightly different issue, namely expanding a navigation property that is 'empty'. Can you post the following details:
    1. The URI / client code you are using to make the request (or whether or not it is the same as your earlier post)
    2. The actual contents of the request and response made (you can use Fiddler ) with debugging information turned on for the service (see Phani's blog post: Debugging ADO.NET Data Services )
    3. The client side error message / exception you are seeing, with stack trace if possible
    4. The model for your service, at least for the types/sets involved in this issue
    5. Some description of the data (ie, which set is empty, which is not)
    Again, it looks like this is a different issue from the one being described/answered above, but I'll have a better idea with this information.

    Matt Meehan ADO.NET Data Services (Astoria)
    Tuesday, April 7, 2009 6:52 PM
  • Vicente,
    Have you installed the recent 1.5 CTP release? Are you hitting the same issue with an empty collection that Dave is, or the general issue originally raised in this thread? As Peter said, there is a known issue that has been fixed in the recent CTP, so you may want to give that a try. You can find more information about it here .
    Matt Meehan ADO.NET Data Services (Astoria)
    Tuesday, April 7, 2009 6:52 PM
  • Hi Matt, thanks for your time. I can't install the 1.5 ctp because I'm developing a production software, I must wait for the RTM version.

    I have the same problem that Dave and I know that it is a known issue, but I thought that Dave didn't know that he can change the MergeOption to AppendOnly and it works, almost to me :)

    Thanks for you time :)
    Tuesday, April 7, 2009 7:31 PM