Hugh Robinson
Hugh Robinson

Reputation: 353

RallyApi - cannot create defect - get error about JsonObject not containing a definition for 'CreateResult'

I am using an older version of .NET RallyApi (version 1.31) from a C# .NET 4 project (full .NET framework). Using this code:

var x = this.RestApi.Create("defect", defectData.GetJsonObject());
CreateResult res = x as CreateResult;

when the Create() call executes, I get a RuntimeBinderException that says "'Rally.RestApi.DynamicJsonObject' does not contain a definition for 'CreateResult'"

The DynamicJsonObject returned by GetJsonObject() contains 14 fields (stuff like Project, Owner, Name, Description, Notes, etc.)

I cannot figure out what this error is telling me here... i.e. what I am doing wrong. This code has worked in the past - now I am on a new Windows domain, I am wondering if it's some sort of security issue hitting the web service, but I CAN do queries to get things like a list of Rally projects... and my Rally user has Subscription Admin privileges...

Upvotes: 1

Views: 50

Answers (1)

Hugh Robinson
Hugh Robinson

Reputation: 353

I updated to the latest rally .NET API code (I got the source and compiled it myself) and now it works - even with the 1.31 version that I am specifying. Not sure why that worked, but it does...

Upvotes: 1

Related Questions