0

I am using Signal R in my mvc 3 application. When I trying to connect from client it gets failed.

$.connection.hub.start(function () {
            alert('connected');
        }).fail(function () { alert('failed'); }).done(function () {
            msgserver.unreadMessagesCount("SignalR", int);
        });
Jega
  • 33
  • 7
  • Sorry guys!!! Actually I have referred the wrong js file. After referring the correct file its working. Thank you all. – Jega Jan 28 '13 at 13:57

2 Answers2

0

You do not implement FormsAuth in SignalR. You implement FormsAuth in your MVC application

pranav rastogi
  • 4,124
  • 23
  • 23
  • I already have FormsAuth in my MVC application. When start the hub connection its failed. Do I have maintain the FormsAuth cookie same as in hub connection? If yes how to do that? – Jega Jan 25 '13 at 04:16
0

This blog post by Tugberk has a full working example of using authentication with SignalR, as well as tips on how to map connections to app users. Try using the attached code as a base for your implementation.

el_tone
  • 1,182
  • 8
  • 16