I experimented signalr using an example on


It worked fine on localhost within visual studio environment. I separated the server side code and uploaded on a remote server. Now when i try to connect with that remote server it is throwing these exceptions Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught Type Error: Cannot read property 'client' of undefined connect.js :9 my code is as in a connect.js file as following block of code

 $(function () {
    alert('i m here');
    $.connection.hub.url = "http://info2gsm.com";
    var IWanaChat = $.connection.myChatHub;
    IWanaChat.client.addMessage = function (message) {
    $("#listMessages").append('<li>' + message + '</li>');





my HTML page is as following block

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-         scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

    <script src="Scripts/jquery-1.8.2.min.js"></script>
    <script src="Scripts/jquery.signalR-1.0.0.js"></script>

    <script src="signalr/hubs" type="text/javascript"></script>
    <script src="Scripts/connect.js"></script>

        <title>Hello World!</title>

     <div id="listMessages">

        <input type="text" ID="txtMessage"></>
        <br />
        <input  id="sendMessage" type="button" value="Send" /><br />
        <script type="text/javascript">
        <script type="text/javascript" src="cordova.js"></script>

Thank You.

Related posts

Recent Viewed