Deleting user Using .NET API

I am trying to delete a user using the .NET API. However, I am getting this error “Version is disabled or provided wrong application info backendless”. What could be the cause of that?

Hi Maheed,

Have you called Backendless.InitApp? If yes, please check the application ID, secret key (for .NET) and version name again.

I called Backendless.InitApp. In fact my program is working fine in all aspects (adding users , adding and removing objects). It gives this error only when I try to delete a user. I am using the .net4.5 backendless.dll under the desktop folder of the .NET sdk. Also I am using the windows phone secret key.

Update:
My user table has a property (1;1) data relation to another table called Group. The problem is upon retrieval of the user object, the GetProperty(“Group”) is a Dictionary not a Group object. This caused an exception every time I tried to save or delete a user. Upon fetching all groups and reassigining the correct group to the user before updating solved the problem. I don’t know if this is the intended behavior of using GetProperty on a relation; I will be posting this in a seperate thread. Thanks a lot.

Maheed,

I just responded in the other thread. Please let me know if the problem with the “version is disabled” message is also resolved. If not, we’ll focus on it in this topic.

Mark

Hello Mark,

Thanks a lot. The problem was resolved.
In case this is of any help, I don’t think “version is disabled” was the correct fault that should have been displayed in my case. I got either “version is disabled” fault or “java.lang.ClassCastException: java.util.HashMap cannot be cast to weborb.v3types.V3Message” fault depending on whether or not the deleted user was created during the current session.
Hope this helps. Thanks.

Hi Maheed,

I agree, that error message does not make sense. Could you please clarify the exact steps that led to that error?

Regards,
Mark

Hi Mark,
I had a relation from the user table to a table called Group. I didnt set

Backendless.Data.MapTableToType( "Group", typeof( MyGroup ) );

Whenever i retrieved a user object and then tried to delete it, it would give the “version is disabled” fault. However, adding this line as you mentioned in the other thread solved the problem. That’s why i think version is disabled is misleading.
Thank you for your time and help. Sorry for the late reply, I didn’t have access to my laptop for while.
Regards,
Maheed