{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5777","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5777/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5777/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5777/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/5777","id":105886593,"number":5777,"title":"Orchard Web Api Post Throwing error in OrchardApiActionFilterDispatcher","user":{"login":"wharri220","id":9452756,"avatar_url":"https://avatars.githubusercontent.com/u/9452756?v=3","gravatar_id":"","url":"https://api.github.com/users/wharri220","html_url":"https://github.com/wharri220","followers_url":"https://api.github.com/users/wharri220/followers","following_url":"https://api.github.com/users/wharri220/following{/other_user}","gists_url":"https://api.github.com/users/wharri220/gists{/gist_id}","starred_url":"https://api.github.com/users/wharri220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wharri220/subscriptions","organizations_url":"https://api.github.com/users/wharri220/orgs","repos_url":"https://api.github.com/users/wharri220/repos","events_url":"https://api.github.com/users/wharri220/events{/privacy}","received_events_url":"https://api.github.com/users/wharri220/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/22","html_url":"https://github.com/OrchardCMS/Orchard/milestones/Orchard%201.9.x","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/22/labels","id":1065780,"number":22,"title":"Orchard 1.9.x","description":"Issues assigned to this milestone have been approved to be developed in the next minor version release of Orchard.","creator":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"open_issues":414,"closed_issues":3,"state":"open","created_at":"2015-04-13T19:41:13Z","updated_at":"2015-09-24T21:30:59Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-09-10T19:57:50Z","updated_at":"2015-09-24T21:30:59Z","closed_at":"2015-09-24T21:30:59Z","body":"I'm trying to implement a REST API in orchard which I call via javascript (ajax). I have a Controller that inherits from ApiController like so: \r\n\r\n    [Authorize]\r\n    public class CustomController : ApiController {\r\n        private readonly ICustomService _customService;\r\n\r\n        public CustomController(ICustomService customService) {\r\n            _customService = customService;\r\n        }\r\n\r\n        public IList<CustomModel> Get() {\r\n            return _customService.GetStuff();\r\n        }\r\n        \r\n        public IHttpActionResult Post(CustomModel dealer) {\r\n            _customService.CreateSomething();\r\n            return Ok();\r\n        }\r\n    }\r\n\r\nThe Get method works as expected and returns a list of items. The post method however throws an error deep in Orchard. Specifically in the OrchardApiActionFilterDispatcher class. It throws several null reference exceptions and causes a 500 response. I found this issue on Stack Overflow that might be related:\r\n\r\nhttp://stackoverflow.com/questions/27442633/possible-bug-with-actionfilterattribute-in-orchard-1-8\r\n\r\nAnyone have any suggestions as to what the problem here could be?"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/143056267","html_url":"https://github.com/OrchardCMS/Orchard/issues/5777#issuecomment-143056267","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5777","id":143056267,"user":{"login":"wharri220","id":9452756,"avatar_url":"https://avatars.githubusercontent.com/u/9452756?v=3","gravatar_id":"","url":"https://api.github.com/users/wharri220","html_url":"https://github.com/wharri220","followers_url":"https://api.github.com/users/wharri220/followers","following_url":"https://api.github.com/users/wharri220/following{/other_user}","gists_url":"https://api.github.com/users/wharri220/gists{/gist_id}","starred_url":"https://api.github.com/users/wharri220/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wharri220/subscriptions","organizations_url":"https://api.github.com/users/wharri220/orgs","repos_url":"https://api.github.com/users/wharri220/repos","events_url":"https://api.github.com/users/wharri220/events{/privacy}","received_events_url":"https://api.github.com/users/wharri220/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T21:30:59Z","updated_at":"2015-09-24T21:30:59Z","body":"This issue turned out to be an error thrown in my code that took some digging to find. Closing the issue. "}}