Error: "Only one complex type allowed as argument to a web api controller action." Solution

Recently in solving word is derived from the foreground to the background data transfer error, can not enter breakpoints:

“Only one complex type allowed as argument to a controller action that's binding source is 'Body'. But AddMenu (api/services/app/ArchvieOrganization/AddMenu) contains more than one! ”

 

Problems reason

Api application interface method is not defined in the incoming frame abp plurality of complex type, containing only a complex type, otherwise called side js api above error occurs when the interface.

What is complex type: custom type is a complex type

api interface methods can have a complex type (the return value, parameters passed)

If the interface method invoked by js there are other nested calls to interface methods, the interface method is called only one complex type (there are more complex types of errors will be reported infinite loop)

Guess the reason: non-stop to find the corresponding interface method container, can not find trigger an infinite loop

You can not be set in the variable of type DataTable interface method

 

Before

Paste Picture

 

After the two classes in a class on it

Paste Picture

 

Paste Picture

Guess you like

Origin www.cnblogs.com/cyqdeshenluo/p/12144711.html