title: "A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'"
body: <p>I am trying to return the object of MVC Model in JSON result using jQuery. I am getting a failure message as:</p>
  
  <blockquote>
    <p>A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule' </p>
  </blockquote>
  
  <p>This is my controller where i am returing the Json result</p>
  
  <pre><code>public ActionResult populateData(string application, string columns, string machine, string pages, string startDate, string endDate)
      {
  
          ErrorPage _objError = new ErrorPage();
          _objError.ErrorData = dbl.GetDataTable(DbConnectionString, Table, whereCondition, columns);
  
  
          //Column description: Name and Type    
          var columnlist = new Dictionary&lt;string, System.Type&gt;();
          foreach (System.Data.DataColumn column in _objError.ErrorData.Columns)
          {       
              var t = System.Type.GetType( column.DataType.FullName );
              columnlist.Add(column.ColumnName, t);  
          }
  
          _objError.ErrorColumns = columnlist;
  
  
          //DataSourceRequest result = _objError.ToDataSourceResult(request);
  
          if (_objError.ErrorData.Rows.Count &gt; 0)
              Message = "Showing Error log for " + AppName + " . To Change the application or filtering options please select the appropriate application from Application Dropdown";
          else
              Message = "No errors found for " + AppName + " in last 24 hours.";
  
  
          return Json(_objError);
      }
  </code></pre>
  
  <p>Here i am giving a Ajax call to Controller method:</p>
  
  <pre><code>$.ajax({
          type: "POST",
          url: '@Url.Content("~/Common/PopulateData")',
          contentType: "application/json; charset=utf-8",
          dataType: 'json',
          data: JSON.stringify({ application: app, columns: columns, machine: machine, pages: pages, startDate: startDate, endDate: endDate }),
          success: function (data) {
              alert("Success");
          },
          error: function (error) {
              alert('error; ' + eval(error));
              alert('error; ' + error.responseText);
          }
      });
  </code></pre>
  
  <p>Kindly help how to return a Model class object to Ajax post call ?</p>