Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8104533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:52:39+00:00 2026-06-05T23:52:39+00:00

Update: Switching to IIS Express instead of the Visual Studio Development Server fixed the

  • 0

Update:
Switching to IIS Express instead of the Visual Studio Development Server fixed the 501 error.

I’m trying to get SignalR working in my MVC4 application but I am running into a strange 501 error. I have followed a couple different tutorials but the result is always the same.

Any help would be appreciated.

I am using Visual Studio 2012 Pro RC and I installed SignalR 0.5.1 through the package manager console.

My code:

Layout

<script src="~/Scripts/jquery-1.7.2.min.js"></script>
<script src="~/Scripts/jquery.signalR-0.5.1.js" type="text/javascript"></script>
<script type="text/javascript" src="@Url.Content("~/signalr/hubs")"></script>

View

<script type="text/javascript">
$(function () {

    // capture the client IP
    var clientIp = $("#clientip").val();

    // create the SignalR proxy
    var userlink = $.connection.userlink;

    // create our callback for the proxy
    userlink.updateViewCount = function (message) {
        $('#view-updates').html('<p>' + message + '</p>');
    };

    // Start the connection
    $.connection.hub.start(function () {
        // send our 'record' message to the hub
        userlink.recordView(clientIp);
    });

});
</script>

<input type="hidden" id="client-ip" value="@ViewBag.ClientIpAddress" />
<div id="view-updates"></div>

Hub Class

public class UserLink : Hub
{
    public void RecordView(string IpAddress)
    {
        QContext db = new QContext();
        db.SiteVisits.Add(new SiteVisit { CreateDate = DateTime.Now, IpAddress = IpAddress });
        db.SaveChanges();

        int userCount = db.SiteVisits.Count();

        string result = string.Format("There have been {0} visits to this page.", userCount);

        Clients.updateViewCount(result);
    }
}

Error I am receiving

Failed to load resource: the server responded with a status of 501 (Not Implemented) http://localhost:58361/signalr/hubs
Uncaught TypeError: Cannot set property 'updateViewCount' of undefined 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:52:41+00:00Added an answer on June 5, 2026 at 11:52 pm

    Debugging in IIS instead of the Visual Studio Development Server fixes the issue, but I’m not sure why. Now I’m curious if anyone knows why it would work in one and not the other.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to update my app and get going with fragments, the action
I am trying to get tests working after switching from Webrat to Capybara. When
I'm frequently sshing into a server, switching to a specific directory and running svn-update
****Update:** using the Rank() over partition syntax available in MS SQL Server 2005 does
Update: fixed delta calculations in code, still the issue remains Folks, could you please
We're switching our MVC3 application from IIS 6 to 7.5. I'm working on setting
I'm switching from a windows server to a linux server and case sensitivity is
I'm trying to develop a way of switching Windows Phone 7 application style depending
I'm getting an error when signing up using Devise. I am switching from a
Does anyone have any good techniques for easily switching between development and live builds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.