mohammed  jaseefar

mohammed jaseefar

  • NA
  • 217
  • 20.2k

HTTP Authentication failed;no valid issue signalR using mvc5

Apr 1 2018 4:43 AM
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:
  1. $(function () {  
  2. // Declare a proxy to reference the hub.  
  3. var notifications = $.connection.messagesHub;  
  4. notifications.client.updateMessages = function () {  
  5. getAllMessages();  
  6. };  
  7. // Start the connection.  
  8. $.connection.hub.start({ transport: ['webSockets''longPolling'] }).done(function () {  
  9. getAllMessages();  
  10. }).fail(function (e) {  
  11. alert(e);  
  12. });  
  13. });  
  14. function getAllMessages() {  
  15. $.ajax({  
  16. url: '/Interview/GetInterviewQuestion',  
  17. contentType: 'application/json',  
  18. type: 'GET',  
  19. dataType: 'JSON',  
  20. cache: false  
  21. }).success(function (result) {  
  22. $("#txtcategory").val(result.Category);  
  23. $("#txtchapter").val(result.Chapter);  
  24. $("#txtpart").val(result.Part);  
  25. $("#txtqstn").val(result.QuestionText);  
  26. }).error(function () {  
  27. });  
  28. }