Click here to Skip to main content
15,941,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am unable to refresh the Grid with any data insertion or updation in SQL using SignalR Technology. I referred the below link:
I have did as follows:
<script src="" type="text/javascript"></script>

    <script src="Scripts/jquery.signalR-1.1.4.js" type="text/javascript"></script>

    <script src="/signalr/hubs" type="text/javascript"></script>

      <script type="text/javascript">

          $(function () {

              // Proxy created on the fly
              var job = $.connection.scoresHub;

              // Declare a function on the score hub so the server can invoke it
              job.client.displayStatus = function () {

              // Start the connection

          function getData() {

              var $tbl = $('#tblJobInfo');
                  url: '../api/values',
                  type: 'GET',
                  datatype: 'json',

                  success: function (data) {
                      if (data.length > 0) {
                          $tbl.append(' <tr><th>Job Title</th><th>Published Date</th><th>Expiry Date</th><th>Job Status</th></tr>');
                          var rows = [];
                          for (var i = 0; i < data.length; i++) {
                              rows.push(' <tr><td>' + data[i].JobTitle + '</td><td>' + data[i].PublishedDate + '</td><td>' + data[i].ExpiryDate + '</td><td>' + data[i].JobStatus + '</td></tr>');

Hub class is as below:
public static void Show()
          IHubContext context = GlobalHost.ConnectionManager.GetHubContext<ScoresHub>();

I a getting the error with status code 404. What is the url to be set in the given case. I want to do this without MVC.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900