title: JSON: 500 (Internal server server error) in .NET MVC3
body: <p>I'm trying to get some JSON functionality to work, it's basically as simple as it can be but for some reason I'm getting a 500 Internal server error on my console and the application never reaches the controller. I've tried just about everything, but the code is so simple I've given up trying to find the error by readin the same couple of lines over and over.</p>
  
  <p>Here is my script:</p>
  
  <pre><code>            $("#saveAdvisorOption").click(function () {
              // Create a JSON object:
              alert("OK");
              var OptionsModel = { "AdvisorNewsFeed": $("#advisorCheckBox").val() };
              alert($(OptionsModel.AdvisorNewsFeed));
              $.post("/Account/ChangeOptionForAdvisor", OptionsModel, function (data) {
  
              });
          });
  </code></pre>
  
  <p>Here is my model:</p>
  
  <pre><code>    public class OptionsModel
  {
      public string AdvisorNewsFeed { get; set; }
  
      public OptionsModel(string AdvisorNewsFeed)
      {
          this.AdvisorNewsFeed = AdvisorNewsFeed;
  
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And here is my controller:</p>
  
  <pre><code>    public class AccountController : Controller
  {
      [HttpPost]
      public ActionResult ChangeOptionForAdvisor( OptionsModel option)
      {
  
          //Return something
          return Json(option, JsonRequestBehavior.AllowGet);
      }
  </code></pre>
  
  <p>I have a break point on the return statement but it is never run. </p>
  
  <p>Any help is greatly appreciated.</p>