The following error is coming.. and updateMessages is not working...
Iam using forms authentication
WebSocket connection to 'ws://localhost:61755/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=j9bM%2FHHu7MwONQYggsJ93b%2BIIB9nei7%2FyNTbf2zTSjyrBIgsVcTvmtBxzYv%2FNHf%2Bbukn81m3tlQcLYIj88QbauJKiP6MtxewwcF4mWdV8jgBu1zQ09M3NB4eIrn%2BSqJe&connectionData=%5B%7B%22name%22%3A%22messageshub%22%7D%5D&tid=3' failed: HTTP Authentication failed; no valid credentials available
Script:
- $(function () {
-
- var notifications = $.connection.messagesHub;
- notifications.client.updateMessages = function () {
- getAllMessages();
- };
-
- $.connection.hub.start({ transport: ['webSockets', 'longPolling'] }).done(function () {
- getAllMessages();
- }).fail(function (e) {
- alert(e);
- });
- });
- function getAllMessages() {
- $.ajax({
- url: '/Interview/GetInterviewQuestion',
- contentType: 'application/json',
- type: 'GET',
- dataType: 'JSON',
- cache: false
- }).success(function (result) {
- $("#txtcategory").val(result.Category);
- $("#txtchapter").val(result.Chapter);
- $("#txtpart").val(result.Part);
- $("#txtqstn").val(result.QuestionText);
- }).error(function () {
- });
- }