title: ModelBinding throws error No parameterless constructor defined for this object
body: <p>I had an API endpoint like below,</p>
  <pre><code>public ActionResult GetData([FromBody] Employee emp)
  {
    
  }
  </code></pre>
  <p>I had a class like below:</p>
  <pre><code>public class Employee : Department
  {
    public string EmpName {get; set;}
    public string EmpDetails {get; set;}
  
  }
  
  public class Department
  {
      public string DeptName {get; set;}
      public TimeZoneInfo ClientTimeZoneInfo { get; set; }
  }
  </code></pre>
  <p>when I pass my object as below, its working fine and endpoint is hitting</p>
  <pre><code>{
    &quot;EmpName&quot; : &quot;Demo&quot;,
    &quot;EmpDetails&quot; : &quot;Test&quot;,
    &quot;DeptName&quot; : &quot;Cargo&quot;
  }
  </code></pre>
  <p>But when I pass my objext like below, throwing error and endpoint is not hitting</p>
  <pre><code>{
    &quot;EmpName&quot; : &quot;Demo&quot;,
    &quot;EmpDetails&quot; : &quot;Test&quot;,
    &quot;DeptName&quot; : &quot;Cargo&quot;,
  
  }
  
  </code></pre>
  <p>When I click on the button on UI it will call my javaScript method replyMesaage(Employee) and obj== Employee object</p>
  <pre><code>  replyMessage(obj) {
          let that = this;
          var token = $('input[name=&quot;__RequestVerificationToken&quot;]').val();
          // call to get the reply message partial view markup
          $.ajax({
              type: &quot;POST&quot;,
              url: &quot;/Messages/GetData&quot;,
              data: { __RequestVerificationToken: token, model: obj },
              success: function (data) {
                  $(window).scrollTop(0);
                  var panelbar = $(&quot;#Dump&quot;).data(&quot;kendoPanelBar&quot;);
                  panelbar.insertBefore({
                      text: &quot;&quot;,
                      encoded: false,
                      content: data,
                      expanded: true,
                      collapse: function (e) {
                          if (e.item.class.contains('reply'))
                              e.preventDefault();
                      }
                  }, panelbar.element.children(&quot;li:first&quot;));
                  var isInternal = $(&quot;#test&quot;).val();
                  var message = $(&quot;#subject&quot;).val();
                  var TypeValue = $(&quot;#TypeValue&quot;).val();
                  that.loadRecipientList(isInternal, message, TypeValue);
              }
          });
  </code></pre>
  <p>Exception:<br />
  No parameterless constructor defined for this object</p>
  <p>Could someone help me with this issue?</p>
  <p>Full Exception:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;No parameterless constructor defined for this object.&lt;/title&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot; /&gt;
          &lt;style&gt;
           body {font-family:&quot;Verdana&quot;;font-weight:normal;font-size: .7em;color:black;} 
           p {font-family:&quot;Verdana&quot;;font-weight:normal;color:black;margin-top: -5px}
           b {font-family:&quot;Verdana&quot;;font-weight:bold;color:black;margin-top: -5px}
           H1 { font-family:&quot;Verdana&quot;;font-weight:normal;font-size:18pt;color:red }
           H2 { font-family:&quot;Verdana&quot;;font-weight:normal;font-size:14pt;color:maroon }
           pre {font-family:&quot;Consolas&quot;,&quot;Lucida Console&quot;,Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
           .marker {font-weight: bold; color: black;text-decoration: none;}
           .version {color: gray;}
           .error {margin-bottom: 10px;}
           .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:pointer; }
           @media screen and (max-width: 639px) {
            pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
           }
           @media screen and (max-width: 479px) {
            pre { width: 280px; }
           }
          &lt;/style&gt;
      &lt;/head&gt;
  
      &lt;body bgcolor=&quot;white&quot;&gt;
  
              &lt;span&gt;&lt;H1&gt;Server Error in '/' Application.&lt;hr width=100% size=1 color=silver&gt;&lt;/H1&gt;
  
              &lt;h2&gt; &lt;i&gt;No parameterless constructor defined for this object.&lt;/i&gt; &lt;/h2&gt;&lt;/span&gt;
  
              &lt;font face=&quot;Arial, Helvetica, Geneva, SunSans-Regular, sans-serif &quot;&gt;
  
              &lt;b&gt; Description: &lt;/b&gt;An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  
              &lt;br&gt;&lt;br&gt;
  
              &lt;b&gt; Exception Details: &lt;/b&gt;System.MissingMethodException: No parameterless constructor defined for this object.&lt;br&gt;&lt;br&gt;
  
              &lt;b&gt;Source Error:&lt;/b&gt; &lt;br&gt;&lt;br&gt;
  
              &lt;table width=100% bgcolor=&quot;#ffffcc&quot;&gt;
                 &lt;tr&gt;
                    &lt;td&gt;
                        &lt;code&gt;
  
  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                      &lt;/code&gt;
  
                    &lt;/td&gt;
                 &lt;/tr&gt;
              &lt;/table&gt;
  
              &lt;br&gt;
  
              &lt;b&gt;Stack Trace:&lt;/b&gt; &lt;br&gt;&lt;br&gt;
  
              &lt;table width=100% bgcolor=&quot;#ffffcc&quot;&gt;
                 &lt;tr&gt;
                    &lt;td&gt;
                        &lt;code&gt;&lt;pre&gt;
  
  [MissingMethodException: No parameterless constructor defined for this object.]
     System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp;amp; canBeCached, RuntimeMethodHandleInternal&amp;amp; ctor, Boolean&amp;amp; bNeedSecurityCheck) +0
     System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp;amp; stackMark) +122
     System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp;amp; stackMark) +239
     System.Activator.CreateInstance(Type type, Boolean nonPublic) +85
     System.Activator.CreateInstance(Type type) +12
     System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) +197
  
  [MissingMethodException: No parameterless constructor defined for this object. Object type &amp;#39;System.TimeZoneInfo&amp;#39;.]
     System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) +233
     System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +511
     System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +333
     System.Web.Mvc.DefaultModelBinder.GetPropertyValue(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, IModelBinder propertyBinder) +17
     System.Web.Mvc.DefaultModelBinder.BindProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor) +377
     System.Web.Mvc.DefaultModelBinder.BindProperties(ControllerContext controllerContext, ModelBindingContext bindingContext) +101
     System.Web.Mvc.DefaultModelBinder.BindComplexElementalModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Object model) +55
     System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +1207
     System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +333
     System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +335
     System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +105
     System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass3_1.&amp;lt;BeginInvokeAction&amp;gt;b__0(AsyncCallback asyncCallback, Object asyncState) +640
     System.Web.Mvc.Async.WrappedAsyncResult`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +14
     System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
     System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +346
     System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginExecuteCore&amp;gt;b__152_0(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +27
     System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
     System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
     System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +494
     System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginExecute&amp;gt;b__151_1(AsyncCallback asyncCallback, Object callbackState, Controller controller) +16
     System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +20
     System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
     System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +403
     System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +16
     System.Web.Mvc.&amp;lt;&amp;gt;c.&amp;lt;BeginProcessRequest&amp;gt;b__20_0(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +54
     System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +30
     System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
     System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +412
     System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
     System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +444
     System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +118
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +163
  &lt;/pre&gt;                      &lt;/code&gt;
  
                    &lt;/td&gt;
                 &lt;/tr&gt;
              &lt;/table&gt;
  
              &lt;br&gt;
  
              &lt;hr width=100% size=1 color=silver&gt;
  
              &lt;b&gt;Version Information:&lt;/b&gt;&amp;nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4210.0
  
              &lt;/font&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  &lt;!-- 
  [MissingMethodException]: No parameterless constructor defined for this object.
     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)
     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
     at System.Activator.CreateInstance(Type type)
     at System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType)
  [MissingMethodException]: No parameterless constructor defined for this object. Object type &amp;#39;System.TimeZoneInfo&amp;#39;.
     at System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType)
     at System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
     at System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
     at System.Web.Mvc.DefaultModelBinder.GetPropertyValue(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, IModelBinder propertyBinder)
     at System.Web.Mvc.DefaultModelBinder.BindProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor)
     at System.Web.Mvc.DefaultModelBinder.BindProperties(ControllerContext controllerContext, ModelBindingConte…
  </code></pre>