Obsolete version of the documentation. Use this documentation if you run XSockets 3.0 or later. Latest documentation
Back to Guides,Quickstarts and how to's

A proof of concept on XSockets, Wijmo, KnockoutJS, EntityFramework Guides,Quickstarts and how to's

We have developed a solution where XSockets is used instead of MVC3. The solution also uses KnockoutJS, Wijmo and Entity Framework (code first).

You can download the source from: https://github.com/codeplanner/XSocketsDemo1

 Screenshots


                  

Comments

  • gravatar Sylvain

    I try to use your example, without success. Could you split your project into two parts: 1. websocket with the server and the installation and 2. the html page without vs 2010. I try to start my project and it would give me a good hand. Overall I quite understand everything, but I find it difficult to start. Thank you for your help. It was talked about a few months ago. Do you speak french?

    Sylvain

    Mar 2013

  • gravatar Uffe Björklund

    Hello Sylvain.

    I just downloaded the project from GitHub and it worked in both VS2010 and VS2012.
    Please tell me a little bit more about your problem.
    Are you trying to run the project without VS?
    You can ofcourse run XSockets as standalone server but you will need a webserver to get a origin to connect from.

    So tell me/us a little bit more and we will try to help you out.

    PS. No french. DS

    Regards
    Uffe, Team XSockets

    Mar 2013

  • gravatar Sylvain

    Hi Uffe,
    Thank you for your quick response, I had not realized that it took a webserver, sorry, but can I make my html pages without vs 2010. How to install vs 2010 project server with a window service.
    Sorry I am not clear. Thank you for your patience ..

    Sylvain

    Mar 2013

  • gravatar Uffe Björklund

    Hello Sylvain.

    If you want to run this particular project you will have to use VisualStudio. But you can of course install XSockets as a windows service (or on azure) and connect to that server from your IDE of choice.

    We will release the next version for MONO and that might help you out a lot if you´re not a Windows guy.

    If you want to get familiar with XSockets without using Visual Studio I would recommend XFiddle.NET or live.xsockets.net.
    Both XFidlle.net and live.xsockets.net let you play with the JavaScript API online without the need of Visual Studio or any other IDE.

    Please let us know if we can help you in any way to get you started in the area filling your needs.

    Regards
    Uffe

    Mar 2013

  • gravatar Sylvain

    Hi, Uffe
    The problem I'm a windows guy not a web guy :), if I want to install your example on my IIS, what's the best way to do it, I publish the entire project or I install the window service with a part of the project or..

    p.s. sorry for basic questions but this is really a great project and I would like to use it

    Thank for your patience..
    Sylvain

    Sylvain

    Mar 2013

  • gravatar Uffe Björklund

    Hello Sylvain.

    The easiest way to get the example on to your IIS is to just publish the project as a regular web.
    Do not install any windows service since that will add extra complexity for you.

    The thing you will have to do is to replace the 127.0.0.1 with the IP of your server. Look at http://xsockets.net/api/net-c#snippet34 and replace 127.0.0.1 with the public IP of the server.

    You will not need the windows service since the example has XSockets running inside the IIS (starts in the global.asax github.com/.../Global.asax.cs)

    So to wrap it up, publish to your server, but configure the solution to run on your server IP instead of localhost.

    Regards
    Uffe

    Mar 2013

  • gravatar Sylvain

    Hello, thank you for your follow, I will try this way.

    Regards
    Sylvain

    Mar 2013

  • gravatar Evandro Coradini

    Hi, this example fails on Chrome (after version 30).

    Issue: "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch."

    The problem seems to be when instantiating the WebSocket.
    We are passing the controller as a "subprotocol", which is not liked by Chrome.

    Quick fix: in line 563 of jXSockets.2.0.0.js,
    change
    webSocket = new window.WebSocket(url, subprotocol);
    by
    webSocket = new window.WebSocket(url);

    Regards
    Evandro

    Dec 2013

  • gravatar Uffe Björklund

    Hello Evandro

    Yes I can imagine that this sample is outdated since Chrome actually updated the handshake a while back.
    I will try to take my time and update the sample a.s.a.p, or maybe build a nuget package for it instead.

    Regards
    Uffe

    Dec 2013