Server Error in '/' Application. No parameterless constructor defined for this object

前端 未结 6 1969
感动是毒
感动是毒 2021-01-11 11:55

The callstack shows the following:

[MissingMethodException: No parameterless constructor defined for this object.]
System.RuntimeTypeHandle.CreateInstance(Ru         


        
6条回答
  •  时光说笑
    2021-01-11 12:29

    Your custom classes in the action args must have a parameterless constructor in order to use the default model binder. Otherwise, either (1) create a custom model binder or (2) pass primitive types instead of custom classes to the Action.

提交回复
热议问题