Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Error when passing object to WebAPI method

$
0
0

I have a WebAPI...

inside this webAPI I reference a Class Library where I do a lot of my actual processing.

For example

public static ObjModel WebAPIMethod(string a, string b, string c)
{

Collection<string> returnFromClassLibrary  = ClassLibrary.SomeMethod(a,b,c);


}

The everything is fine if i use a primitive but when I try to use any kind of object it blows up with a 500 error.

Obviously I have deduced that there is some problem in serializing this object from the class library back to the WebAPI method.

Is there a way to use something other than primitives? 


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>