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 8228527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:29:15+00:00 2026-06-07T16:29:15+00:00

I have an application in MVC 3 and I’m looking to add WebSockets (with

  • 0

I have an application in MVC 3 and I’m looking to add WebSockets (with fallback to Comet) to it.

I’ve researched a bit and I found out the Comet part is pretty straightforward and I’d much rather do it myself. Just AsyncControllers and a pretty plain bit of js is all that’s required to handle those long-lived ajax requests.

Now, in the case of WebSocket, things start to get dirty. I’ve looked at a few libraries, but they mostly seem to set up a web server (therefore needing another host, or port) of their own, and listen to ws protocol requests there. This is the case for instance for SuperWebSocket, which seemed nice at first, but had this “I’m a web server” issue (which is perfectly fine of course, but I’d rather avoid).

Then I looked at “PingIt” or something like that, I can’t find the link now.., I do have the source on another computer though. This one DOES run on an endpoint in mvc, but I didn’t quite like the way in which it handles things, like it takes an IDisposable object and through reflector it creates a javascript piece that gets rendered in the client, which is very polluted with their library’s name, which I’ve really no interest in, plus it felt like a lot of it was being thrown in against what I might wish, which kind of goes against my view on how a page should be rendered like (specially now that I’m working on MVC which pretty much means I can code clean, unobtrusive html pages).

Basically what I want is my endpoints to be something like:

domain.com/rt/comet
domain.com/rt/socket

rather than

domain.com/rt/comet
domain.com:81/

So: is it possible to receive websocket connections (and do handshaking and whatever needs to be done) on an endpoint within an asp.net MVC application’s controller, rather than setting up a tcplistener somewhere?

This would also help me keep my comet code a little closer to my websocket code

I should say I’m seriously new to the whole comet/websockets thing, so I don’t really know much (or any) of the protocol, I do understand how to make comet work, but not so much in websockets, though I’ve read and understood the basics to get the gist of it.

Also: please let me know if what I’m asking is way off

  • 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-07T16:29:16+00:00Added an answer on June 7, 2026 at 4:29 pm

    Just going to agree with the comments and provide a few links. SignalR is the way to go.

    The site: http://signalr.net/ and http://www.asp.net/signalr

    The code: https://github.com/SignalR/SignalR

    Nuget: Install-Package Microsoft.AspNet.SignalR -pre

    Good starting points:

    • Free E-Book http://www.eduardopires.net.br/Repositorio/SignalR_eBook.pdf

    • http://weblogs.asp.net/davidfowler/archive/2012/11/11/microsoft-asp-net-signalr.aspx

    • http://www.dotnetcurry.com/ShowArticle.aspx?ID=780

    • http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx

    Video from one of the creators: http://vimeo.com/43659069 <–[Loads of information!]

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

Sidebar

Related Questions

I have MVC application configured to use Forms Authentication. I'm signing out users by
I have a MVC application that I am now trying to add authentication and
I have mvc application (tutorial) running OK on SQL Server Express: <add name=MusicStoreEntities connectionString=data
I have an MVC application that I'm trying to add the ManagedFusion.Web.Captcha.CaptchaImageHandler into so
I have an mvc application that I allow businesses to log in using https://storea.mydomain.com
I have an MVC application created from the Internet template to use forms authentication,
I have an MVC application that is using MEF for the controllers, all working
I have an MVC application view that is generating quite a large HTML table
I have an MVC application which is my marketing website, and two other regular
I have an MVC application which has a set of fields for contact details

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.