c# - Internal Server Error Ajax ASP.NET MVC 4.5 -
i'm getting internal server error when try call action in controller, curiosity that's working in machine , in iis(i'm using iis 8 in machine), problem happens in iis 7 in environment.
javascript code:
@section script { <!--reference autogenerated signalr hub script. --> <script src="~/signalr/hubs"></script> <script type="text/javascript"> $(document).ready(function () { // declare proxy reference hub. var notifications = $.connection.executionhub; //debugger; // create function hub can call broadcast messages. notifications.client.updatemessages = function () { getallmessages(); }; // start connection. $.connection.hub.start().done(function () { getallmessages(); }).fail(function (e) { alert("fail hub start: " + e); }); }); function getallmessages() { var div = $('#sig'); $.ajax({ method: 'get', url: '@url.content("~/home/getmessages")', datatype: 'html' }).success(function (result) { div.empty().append(result); }).error(function (jqxhr, textstatus, errorthrown) { alert("fail /home/getmessages: " + jqxhr + " " + textstatus + " " + errorthrown); }); } </script> }
controller:
[httpget] public partialviewresult getmessages() { executionrepository _executionrepository = new executionrepository(); executionmodel model = new executionmodel(); model.messages = _executionrepository.getnotification(); return partialview("dashboard", model); }
i tried several approaches, didn't change in iis, guys me?
thanks, jonas
Comments
Post a Comment