This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Model Binding goes into an infinite loop when the view model has a Func<> #4505
Closed
Description
This is my model:
public class ContentFieldInfo
{
public string FieldTypeName { get; set; }
[BindNever]
public Func<ContentPartFieldDefinition, object> Factory { get; set; }
}
It's part of a bigger view model, but this is what makes the app fails when it's added to the view model.
If a request tries to model bind it in an action, the process never ends and keeps increasing memory. A memory dump shows a cycle in DefaultMetadataDetails
. It doesn't even breaks in the action, the controller is instantiated though.
I will provide a sample. Just filing now with the information I have in case something obvious comes to mind.