Could not find method named Post() or Any()

In the UI api explorer all my endpoints have suddenly stopped working. Our web app still works which is calling the correct endpoints with the correct verbs.

But, for example the UI correctly identifies this method as a GET but when I click submit I get an exception saying 'Could not find method named Post(…) or Any(…) on Service …

EDIT: I’ve deleted my cookies and am now getting exceptions when attempting to authenticate…

I’ve found this is all caused by returning an Object that is inherited from Collection<>

Further details can be found in this forum post.

Can let me know if this is still an issue with the latest v6.3.1+ on MyGet.

Yes, it still appears to be an issue for me

I’ve updated the repo from the other thread to reproduce the problem [https://github.com/Drammy/ss_tlist_recreation]

The issue is your DataList Type inheriting Collection<DataInstance>, it’s not possible to serialize custom Types that inherits collections.

The only time this is supported is when defining a Request DTO that accepts a raw collection, but even that can’t support properties which isn’t serializable in any of our serialization formats.

Can you also remove any private repo packages from stand-alone repros, a nuget restore fails trying to download from https://nuget.pkg.github.com/MalumaSolutions/index.json.

Otherwise replacing DataList with List<DataInstance> seems to work without issue?

FYI you should leave package references as Version="6.*" instead of a mix of wildcard and Version="6.3.1" references as it’s easy for incompatible versions to be installed.

1 Like

Yeah, I got it working with the List; I just put the collection back in because I thought you wanted to know if that worked in the latest myGet build.

Our main source has the wildcards. I only temporarily changed to 6.3.1 because we’d had problems using myGet before.

Thanks for the guidance and assistance @mythz

1 Like