title: pass data from http request to C# controller
body: <p>My problem is when I pass the data to C# controller my loginInfo is <strong>null</strong> payload is ok and show stringify loginfo but my method do not get logInfo.</p>
  <p><strong>Service</strong></p>
  <pre><code>comaxApp.factory('user', function($http) {
    return {
      login: function(loginInfo) {
        $http({
          url: './data/LogIn',
          method: &quot;POST&quot;,
          data: loginInfo,
          headers: {
            'Content-Type': 'application/json'
          }
        }).success(function(data, status, headers, config) {
          $scope.users = data.users;
        }).error(function(data, status, headers, config) {
          $scope.status = status + ' ' + headers;
        });
      }
    };
  });
  </code></pre>
  <p><strong>Controller</strong></p>
  <pre><code>$scope.login = function() {
      var loginInfo = {
          &quot;user&quot;: &quot;admin&quot;,
          &quot;password&quot;: &quot;123&quot;
      };
      loginInfo = JSON.stringify(loginInfo);
      user.login(loginInfo).then(function(users) {
          $scope.users = users.data;
      }, function(status) {});
  };
  </code></pre>
  <p><strong>MVC Controller</strong></p>
  <pre><code>public string LogIn(string loginInfo) {
    
    var obj = new JavaScriptSerializer();
    var result = obj.DeserializeObject(loginInfo);
    
    
    var db = new comaxDataEntities();
    var linq = db.accounts.Where(u =&gt; u.userName == loginInfo);
    var useraccount = linq.FirstOrDefault &lt; account &gt; ();
    
    var javaScriptSerializer = new JavaScriptSerializer();
    string jsonString = javaScriptSerializer.Serialize(useraccount);
    return jsonString;
    
  }
  </code></pre>